diff options
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)) |