summaryrefslogtreecommitdiff
path: root/src/render/safeopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-09 00:27:13 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-09 00:27:13 +0300
commitb4ec726fe28f65b15fd4cc7b0ef6fd72b7d24c02 (patch)
tree2f036904b433f9a1753b2bcbb6fbc99a5d0b643e /src/render/safeopenglgraphics.cpp
parent17a08b25c0df685e3f5c7edf1d4ab583f55ecaf9 (diff)
downloadmv-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.cpp2
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))