mirror of
https://github.com/openwrt/video.git
synced 2025-12-21 17:04:37 +04:00
21 lines
654 B
Diff
21 lines
654 B
Diff
--- a/src/video/wayland/SDL_waylandwindow.c
|
|
+++ b/src/video/wayland/SDL_waylandwindow.c
|
|
@@ -2292,7 +2292,7 @@ void Wayland_DestroyWindow(_THIS, SDL_Wi
|
|
SDL_VideoData *data = _this->driverdata;
|
|
SDL_WindowData *wind = window->driverdata;
|
|
|
|
- if (data) {
|
|
+ if (wind) {
|
|
#ifdef SDL_VIDEO_OPENGL_EGL
|
|
if (wind->egl_surface) {
|
|
SDL_EGL_DestroySurface(_this, wind->egl_surface);
|
|
@@ -2346,6 +2346,8 @@ void Wayland_DestroyWindow(_THIS, SDL_Wi
|
|
wl_surface_destroy(wind->surface);
|
|
|
|
SDL_free(wind);
|
|
+ }
|
|
+ if (data) {
|
|
WAYLAND_wl_display_flush(data->display);
|
|
}
|
|
window->driverdata = NULL;
|