diff options
-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); |