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.
This commit is contained in:
Stephen Collins 2019-06-23 06:23:08 -06:00 committed by Clement Lefebvre
parent db60af5efb
commit 52ee1591f7
1 changed files with 2 additions and 1 deletions

View File

@ -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);