From 5d456d5b954dcc8a125db7638d369574c0095c05 Mon Sep 17 00:00:00 2001 From: Ollie Date: Thu, 28 May 2026 21:18:18 +0200 Subject: [PATCH] selection: fix crash on Wayland when W_NativeInternAtom called with NULL display --- WINGs/widgets_x11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WINGs/widgets_x11.c b/WINGs/widgets_x11.c index 01ec481..9e2ae95 100644 --- a/WINGs/widgets_x11.c +++ b/WINGs/widgets_x11.c @@ -296,5 +296,7 @@ const W_PlatformBackend W_PlatformBackendX11 = { */ WMNativeAtom W_NativeInternAtom(W_Screen *scr, const char *name) { + if (!scr || !scr->display) + return WM_NATIVE_NONE; return XInternAtom(scr->display, name, False); }