diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -287,12 +287,22 @@ int main(int argc, char **argv) if (editor == NULL) goto failed_to_load_editor; status = load_all_gui_components(); - if (!status) goto failed_to_load_editor; + if (!status) goto failed_to_load_gui_components; gtk_widget_show_now(editor); } + /** + * Pour éviter le message de GCC : + * + * """ + * warning: ‘editor’ may be used uninitialized in this function [-Wmaybe-uninitialized] + * """ + */ + else + editor = NULL; + init_all_plugins(true); config = get_main_configuration(); @@ -411,12 +421,14 @@ int main(int argc, char **argv) exit_all_plugins(); if (!batch_mode) - g_object_unref(G_OBJECT(editor)); + unload_all_gui_components(); - failed_to_load_editor: + failed_to_load_gui_components: if (!batch_mode) - unload_all_gui_components(); + g_object_unref(G_OBJECT(editor)); + + failed_to_load_editor: unload_all_basic_components(); |