[Scummvm-git-logs] scummvm master -> a3bc386335a529966008722bf9d66963a20ce3c0

sev- sev at scummvm.org
Sun Mar 29 11:40:45 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a3bc386335 SDL2: silence 'window magic' assert


Commit: a3bc386335a529966008722bf9d66963a20ce3c0
    https://github.com/scummvm/scummvm/commit/a3bc386335a529966008722bf9d66963a20ce3c0
Author: athrxx (athrxx at scummvm.org)
Date: 2020-03-29T13:40:40+02:00

Commit Message:
SDL2: silence 'window magic' assert

Some builds of SDL2 (in my case the vcpkg debug Winx64 build) trigger an annoying and rather pointless assert when calling SDL_GetWindowWMInfo() with a _window parameter of 0 (window && window->magic == &this->window_magic). This commit silences that.

Changed paths:
    backends/platform/sdl/sdl-window.cpp


diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp
index dbfb765e51..cb473ea819 100644
--- a/backends/platform/sdl/sdl-window.cpp
+++ b/backends/platform/sdl/sdl-window.cpp
@@ -186,7 +186,7 @@ void SdlWindow::iconifyWindow() {
 bool SdlWindow::getSDLWMInformation(SDL_SysWMinfo *info) const {
 	SDL_VERSION(&info->version);
 #if SDL_VERSION_ATLEAST(2, 0, 0)
-	return SDL_GetWindowWMInfo(_window, info);
+	return _window ? SDL_GetWindowWMInfo(_window, info) : false;
 #else
 	return SDL_GetWMInfo(info);
 #endif




More information about the Scummvm-git-logs mailing list