app: don't inhibit or uninhibit when there is no GtkApplication.
I had the case when gimp_exit_idle_cleanup_stray_images() would clean up some images on exit, apparently after the GtkApplication is itself already gone.
This commit is contained in:
parent
d361ba4c9a
commit
537c3bb2c8
1 changed files with 5 additions and 0 deletions
|
|
@ -1001,6 +1001,11 @@ gui_inhibit (Gimp *gimp)
|
|||
}
|
||||
|
||||
app = GTK_APPLICATION (g_application_get_default ());
|
||||
if (app == NULL)
|
||||
/* This may happen when quitting. The GtkApplication is finalized
|
||||
* faster than the images without display.
|
||||
*/
|
||||
return;
|
||||
|
||||
if (gimp_displays_dirty (gimp))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue