diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2015-11-09 00:08:12 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2015-11-09 00:08:12 (GMT) | 
| commit | dc49b249f21c1c8582b9ca8debdd5fbdd15eadae (patch) | |
| tree | b5292d8fa7d94793623989e1c4d6074e8da02c4f | |
| parent | 4bafbf79e8143941d744c9c47e6fc9216fcec47a (diff) | |
Avoided to load the status bar twice and to crash in the worst case.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@605 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | plugins/pychrysa/pychrysa.c | 12 | ||||
| -rw-r--r-- | src/gtkext/gtkextstatusbar.c | 7 | 
3 files changed, 20 insertions, 5 deletions
@@ -1,3 +1,9 @@ +15-11-09  Cyrille Bagard <nocbos@gmail.com> + +	* plugins/pychrysa/pychrysa.c: +	* src/gtkext/gtkextstatusbar.c: +	Avoid to load the status bar twice and to crash in the worst case. +  15-11-04  Cyrille Bagard <nocbos@gmail.com>  	* plugins/pychrysa/analysis/contents/file.c: diff --git a/plugins/pychrysa/pychrysa.c b/plugins/pychrysa/pychrysa.c index f3acec3..68ab15b 100644 --- a/plugins/pychrysa/pychrysa.c +++ b/plugins/pychrysa/pychrysa.c @@ -522,10 +522,18 @@ PyMODINIT_FUNC PyInit_pychrysalide(void)      add_pixmap_directory(PACKAGE_DATA_DIR);      add_pixmap_directory(PACKAGE_SOURCE_DIR G_DIR_SEPARATOR_S "pixmaps"); -    init_work_queue(NULL/* !! */); +    /** +     * On évite d'initialiser deux fois... +     */ +    if (get_work_queue() != NULL) +        init_work_queue(NULL/* !! */);  #endif -    init_work_queue(NULL/* !! */); +    /** +     * On évite d'initialiser deux fois... +     */ +    if (get_work_queue() != NULL) +        init_work_queue(NULL/* !! */);      //////////////////////// diff --git a/src/gtkext/gtkextstatusbar.c b/src/gtkext/gtkextstatusbar.c index 74c23bd..8051d41 100644 --- a/src/gtkext/gtkextstatusbar.c +++ b/src/gtkext/gtkextstatusbar.c @@ -539,7 +539,9 @@ status_blob_info *init_progessive_status(GtkExtStatusBar *bar, const char *messa      result = (status_blob_info *)calloc(1, sizeof(status_blob_info)); -    g_object_ref(G_OBJECT(bar)); +    if (bar != NULL) +        g_object_ref(G_OBJECT(bar)); +      result->bar = bar;      result->id = gtk_extended_status_bar_push(bar, message, max > 0.0); @@ -569,8 +571,7 @@ void fini_progessive_status(status_blob_info *info)      gtk_extended_status_bar_remove(info->bar, info->id);      if (info->bar != NULL) - -    g_object_unref(G_OBJECT(info->bar)); +        g_object_unref(G_OBJECT(info->bar));      free(info);  | 
