summaryrefslogtreecommitdiff
path: root/src/gui/editor.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-06-24 19:16:23 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-06-24 19:16:23 (GMT)
commitd614d4b09230411455ed07aac289025a55633da8 (patch)
treec94a14097f9e97b21e5780852589d167ca68ba59 /src/gui/editor.c
parentafc9e5510d9520928480042a56a193dd71db6a01 (diff)
Referenced all accesses to the main window.
Diffstat (limited to 'src/gui/editor.c')
-rw-r--r--src/gui/editor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c
index 627df95..f2807bf 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -222,6 +222,8 @@ GtkWidget *create_editor(void)
gtk_container_set_border_width(GTK_CONTAINER(result), 4);
gtk_window_set_title(GTK_WINDOW(result), _("Chrysalide"));
+ g_object_ref_sink(G_OBJECT(result));
+
set_editor_window(GTK_WINDOW(result));
g_generic_config_get_value(get_main_configuration(), MPK_TITLE_BAR, &hide);
@@ -411,6 +413,8 @@ static void on_destroy_editor(GtkWidget *widget, GObject *ref)
/* On évite de mettre à jour un affichage disparu... */
register_project_change_notification(NULL);
+ set_editor_window(NULL);
+
/* Si la boucle principale est bien lancée, on en sort ! */
if (gtk_main_level() > 0)
gtk_main_quit();