diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index 20fe6022e1..b08da5bbeb 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -295,7 +295,9 @@ Wayland_WaitEventTimeout(_THIS, int timeout) } #ifdef HAVE_LIBDECOR_H - libdecor_dispatch(d->shell.libdecor, timeout); + if (d->shell.libdecor) { + libdecor_dispatch(d->shell.libdecor, timeout); + } #endif /* wl_display_prepare_read() will return -1 if the default queue is not empty.