mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Fix Wayland_DestroyWindow SEGFAULT
Check if the wind pointer is NULL, to avoid SEGFAULT. Already implemented in SDL3, but not yet backported.
This commit is contained in:
parent
57462dad9c
commit
6e43302694
1 changed files with 1 additions and 1 deletions
|
|
@ -2292,7 +2292,7 @@ void Wayland_DestroyWindow(_THIS, SDL_Window *window)
|
|||
SDL_VideoData *data = _this->driverdata;
|
||||
SDL_WindowData *wind = window->driverdata;
|
||||
|
||||
if (data) {
|
||||
if (data && wind) {
|
||||
#ifdef SDL_VIDEO_OPENGL_EGL
|
||||
if (wind->egl_surface) {
|
||||
SDL_EGL_DestroySurface(_this, wind->egl_surface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue