diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 5af5add45..28d7b2cbb 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -2470,11 +2470,8 @@ void Wayland_SetWindowSize(SDL_VideoDevice *_this, SDL_Window *window) void Wayland_GetWindowSizeInPixels(SDL_VideoDevice *_this, SDL_Window *window, int *w, int *h) { - SDL_WindowData *data; + SDL_WindowData *data = window->driverdata; - SDL_assert(window->driverdata) - - data = window->driverdata; *w = data->current.drawable_width; *h = data->current.drawable_height; }