aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/openglsdl
diff options
context:
space:
mode:
authorLittleboy2015-05-15 23:30:02 -0400
committerLittleboy2015-05-15 23:30:02 -0400
commited3a32a91ab9d1d1880034e1e09de3d16c17ed4a (patch)
tree39c7b21686e59513deb014c62ee1b2e808bc5b64 /backends/graphics/openglsdl
parent3698ca8cf7e413687a65b72aebef8dc6804a585c (diff)
downloadscummvm-rg350-ed3a32a91ab9d1d1880034e1e09de3d16c17ed4a.tar.gz
scummvm-rg350-ed3a32a91ab9d1d1880034e1e09de3d16c17ed4a.tar.bz2
scummvm-rg350-ed3a32a91ab9d1d1880034e1e09de3d16c17ed4a.zip
SDL: Check for NULL when listing available modes via SDL_ListModes
It can be returned when there are no dimensions available for the currently selected pixel format
Diffstat (limited to 'backends/graphics/openglsdl')
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index c71b9c9219..53868b86d8 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -57,7 +57,7 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(uint desktopWidth, uint deskt
}
#else
const SDL_Rect *const *availableModes = SDL_ListModes(NULL, SDL_OPENGL | SDL_FULLSCREEN);
- if (availableModes != (void *)-1) {
+ if (availableModes != NULL && availableModes != (void *)-1) {
for (;*availableModes; ++availableModes) {
const SDL_Rect *mode = *availableModes;