From 52ee1591f7c2ad3e288b6260d622204a2b45b365 Mon Sep 17 00:00:00 2001 From: Stephen Collins Date: Sun, 23 Jun 2019 06:23:08 -0600 Subject: [PATCH] Prevent a warning when closing the window while print preview is open (#315) The warning was caused by the preview trying to save print settings after the settings object was cleared. Clearing the settings object in *_finalize instead of *_dispose fixes the issue. --- xed/xed-tab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xed/xed-tab.c b/xed/xed-tab.c index 596c62f..12e5ac0 100644 --- a/xed/xed-tab.c +++ b/xed/xed-tab.c @@ -269,7 +269,6 @@ xed_tab_dispose (GObject *object) { XedTab *tab = XED_TAB (object); - g_clear_object (&tab->priv->editor); g_clear_object (&tab->priv->task_saver); clear_loading (tab); @@ -282,6 +281,8 @@ xed_tab_finalize (GObject *object) { XedTab *tab = XED_TAB (object); + g_clear_object (&tab->priv->editor); + if (tab->priv->timer != NULL) { g_timer_destroy (tab->priv->timer);