diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 8de3b6fbb..2ead29e6d 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -3462,6 +3462,10 @@ void SDL_DestroyWindow(SDL_Window *window) _this->current_glwin = NULL; } + if (_this->wakeup_window == window) { + _this->wakeup_window = NULL; + } + /* Now invalidate magic */ window->magic = NULL;