From c0a5fffb45f849e224750f27fa8c3be5ac447ad6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 14 Sep 2011 01:46:13 +0300 Subject: Add more checks. Fix error in event.cpp from last commits. Improve party members sorting. --- src/openglgraphics.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/openglgraphics.cpp') diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index 332f79823..03d38e7e2 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -1023,6 +1023,9 @@ SDL_Surface* OpenGLGraphics::getScreenshot() w, h, 24, 0xff0000, 0x00ff00, 0x0000ff, 0x000000); + if (!screenshot) + return 0; + if (SDL_MUSTLOCK(screenshot)) SDL_LockSurface(screenshot); -- cgit v1.2.3-60-g2f50