summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resources/image.cpp3
1 files changed, 3 insertions, 0 deletions
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;