diff options
author | Littleboy | 2015-05-15 23:30:02 -0400 |
---|---|---|
committer | Littleboy | 2015-05-15 23:30:02 -0400 |
commit | ed3a32a91ab9d1d1880034e1e09de3d16c17ed4a (patch) | |
tree | 39c7b21686e59513deb014c62ee1b2e808bc5b64 /backends/graphics/openglsdl | |
parent | 3698ca8cf7e413687a65b72aebef8dc6804a585c (diff) | |
download | scummvm-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.cpp | 2 |
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; |