From 2f2443e9b2dab7c69c5713ece18b95f4b03e0e85 Mon Sep 17 00:00:00 2001 From: Bertram Date: Fri, 14 Aug 2009 00:29:29 +0200 Subject: Prevented another possible segfault... --- src/resources/image.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 4b913b57..8e4360e6 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -244,6 +244,9 @@ void Image::setAlpha(float a) Image* Image::SDLmerge(Image *image, int x, int y) { + if (!mSDLSurface) + return NULL; + SDL_Surface* surface = new SDL_Surface(*(image->mSDLSurface)); Uint32 surface_pix, cur_pix; -- cgit v1.2.3-70-g09d2