mirror of https://github.com/GNOME/gimp.git
app: keep a ref to the session info in gimp_session_info_restore()
because failing to restore a dock can destroy the newly created dock and implicitly unref the session info.
This commit is contained in:
parent
68a56a861e
commit
9e60dd547d
|
@ -467,6 +467,8 @@ gimp_session_info_restore (GimpSessionInfo *info,
|
|||
g_return_if_fail (GIMP_IS_SESSION_INFO (info));
|
||||
g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
|
||||
|
||||
g_object_ref (info);
|
||||
|
||||
display = gdk_display_get_default ();
|
||||
|
||||
if (info->p->screen != DEFAULT_SCREEN)
|
||||
|
@ -512,6 +514,8 @@ gimp_session_info_restore (GimpSessionInfo *info,
|
|||
factory,
|
||||
screen,
|
||||
GIMP_DOCK_WINDOW (dialog));
|
||||
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
||||
/* This function mostly lifted from
|
||||
|
|
Loading…
Reference in New Issue