From 4152e90e7e94d5eccc6feac1ea500d73d9d28db8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 2 Aug 2020 22:43:48 -0400 Subject: [PATCH] x11: Ignore stray DestroyNotify events There's no use in making a delete event with a NULL surface. Just ignore such events. Fixes: #3006 --- gdk/x11/gdkdisplay-x11.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index e895a07867..a2bcefa67d 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -795,7 +795,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator, if (!is_substructure) { - event = gdk_delete_event_new (surface); + if (surface) + event = gdk_delete_event_new (surface); if (surface && GDK_SURFACE_XID (surface) != x11_screen->xroot_window) gdk_surface_destroy_notify (surface);