Commit 4257974e authored by Felix Riemann's avatar Felix Riemann
Browse files

EogWindow: Avoid critical warning when saving images on exit

The general save callback and the specific callback for saving images on
exit both clear the window's save job. The second callback triggering
will then cause a critical warning. Instead of manually clearing the
job, use `g_clear_object` which avoids that warning.

Fixes #263.
parent d9afbcaa
Pipeline #463086 passed with stage
in 7 minutes and 35 seconds
......@@ -2331,8 +2331,7 @@ eog_job_close_save_cb (EogJobSave *job, gpointer user_data)
window);
/* clean the last save job */
g_object_unref (window->priv->save_job);
window->priv->save_job = NULL;
g_clear_object (&window->priv->save_job);
/* recover save action from actions group */
action_save = g_action_map_lookup_action (G_ACTION_MAP (window),
......@@ -2774,8 +2773,7 @@ eog_job_save_cb (EogJobSave *job, gpointer user_data)
window);
/* clean the last save job */
g_object_unref (window->priv->save_job);
window->priv->save_job = NULL;
g_clear_object (&window->priv->save_job);
/* recover save action from actions group */
action_save = g_action_map_lookup_action (G_ACTION_MAP (window),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment