From 8cf1aaf40ff64a0729784d57ffbc51f0692cfacf Mon Sep 17 00:00:00 2001 From: Anders Jonsson Date: Thu, 24 Oct 2024 18:17:18 +0200 Subject: [PATCH] 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. --- app/display/gimpdisplay-foreach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/display/gimpdisplay-foreach.c b/app/display/gimpdisplay-foreach.c index 6675e85d1d..0039b0c27a 100644 --- a/app/display/gimpdisplay-foreach.c +++ b/app/display/gimpdisplay-foreach.c @@ -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;