diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-09 00:27:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-09 00:27:13 +0300 |
commit | b4ec726fe28f65b15fd4cc7b0ef6fd72b7d24c02 (patch) | |
tree | 2f036904b433f9a1753b2bcbb6fbc99a5d0b643e /src/render/safeopenglgraphics.cpp | |
parent | 17a08b25c0df685e3f5c7edf1d4ab583f55ecaf9 (diff) | |
download | mv-b4ec726fe28f65b15fd4cc7b0ef6fd72b7d24c02.tar.gz mv-b4ec726fe28f65b15fd4cc7b0ef6fd72b7d24c02.tar.bz2 mv-b4ec726fe28f65b15fd4cc7b0ef6fd72b7d24c02.tar.xz mv-b4ec726fe28f65b15fd4cc7b0ef6fd72b7d24c02.zip |
Add some missing checks to render found by paranucker.
Diffstat (limited to 'src/render/safeopenglgraphics.cpp')
-rw-r--r-- | src/render/safeopenglgraphics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index eadd794b8..f7638c5a1 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -532,7 +532,7 @@ SDL_Surface* SafeOpenGLGraphics::getScreenshot() SDL_Surface *const screenshot = MSDL_CreateRGBSurface( SDL_SWSURFACE, w, h, 24, 0xff0000, 0x00ff00, 0x0000ff, 0x000000); - if (!screenshot) + if (!screenshot || !screenshot->pixels) return nullptr; if (SDL_MUSTLOCK(screenshot)) |