[Scummvm-git-logs] scummvm master -> 95f1b010f886657314fafec5fcbe57d4d57b039f

athrxx athrxx at scummvm.org
Sun Aug 15 14:18:35 UTC 2021


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:
95f1b010f8 SDL: avoid assert with SDL debug builds


Commit: 95f1b010f886657314fafec5fcbe57d4d57b039f
    https://github.com/scummvm/scummvm/commit/95f1b010f886657314fafec5fcbe57d4d57b039f
Author: athrxx (athrxx at scummvm.org)
Date: 2021-08-15T16:18:16+02:00

Commit Message:
SDL: avoid assert with SDL debug builds

Changed paths:
    backends/graphics/openglsdl/openglsdl-graphics.cpp


diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 9f1b5397b9..cb30bc0ca8 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -350,7 +350,8 @@ bool OpenGLSdlGraphicsManager::loadVideoMode(uint requestedWidth, uint requested
 	Common::Rect desktopRes = _window->getDesktopResolution();
 
 #if SDL_VERSION_ATLEAST(2, 0, 0)
-	bool _isMaximized = (SDL_GetWindowFlags(_window->getSDLWindow()) & SDL_WINDOW_MAXIMIZED);
+	SDL_Window *window = _window->getSDLWindow();
+	bool _isMaximized = window ? (SDL_GetWindowFlags(window) & SDL_WINDOW_MAXIMIZED) : false;
 	if (_isMaximized && ConfMan.hasKey("window_maximized_width", Common::ConfigManager::kApplicationDomain) && ConfMan.hasKey("window_maximized_height", Common::ConfigManager::kApplicationDomain)) {
 		// Set the window size to the values stored when the window was maximized
 		// for the last time.




More information about the Scummvm-git-logs mailing list