selection: fix crash on Wayland when W_NativeInternAtom called with NULL display

This commit is contained in:
Ollie 2026-05-28 21:18:18 +02:00
parent 367b488e47
commit 5d456d5b95
1 changed files with 2 additions and 0 deletions

View File

@ -296,5 +296,7 @@ const W_PlatformBackend W_PlatformBackendX11 = {
*/ */
WMNativeAtom W_NativeInternAtom(W_Screen *scr, const char *name) WMNativeAtom W_NativeInternAtom(W_Screen *scr, const char *name)
{ {
if (!scr || !scr->display)
return WM_NATIVE_NONE;
return XInternAtom(scr->display, name, False); return XInternAtom(scr->display, name, False);
} }