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:
Jehan 2024-09-21 18:25:18 +02:00
parent d361ba4c9a
commit 537c3bb2c8

View file

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