Issue #12216: fix crash on switch to MWM

Since commit 4e499810, GIMP could crash on switching to
multi-window mode on X11 Linux systems.

As suggested by Alx Sa it is enough to add a NULL check for
shell to avoid the crash.
This commit is contained in:
Anders Jonsson
2024-10-24 18:17:18 +02:00
committed by Alx Sa
parent 2db868ab50
commit 8cf1aaf40f

View File

@ -336,7 +336,7 @@ gimp_displays_accept_focus_events (Gimp *gimp)
{
GimpDisplayShell *shell = gimp_image_window_get_active_shell (iter->data);
if (! gimp_display_shell_is_drawn (shell))
if (shell && ! gimp_display_shell_is_drawn (shell))
{
accept = FALSE;
break;