diff options
author | Bertram <bertram@cegetel.net> | 2009-08-14 00:29:29 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-08-14 00:29:29 +0200 |
commit | 2f2443e9b2dab7c69c5713ece18b95f4b03e0e85 (patch) | |
tree | 59c59c132acad54e6223256292272aa237fc94fd /src/resources/image.cpp | |
parent | d6f3fde56c562a0a060c5e472c831c577c9a33c1 (diff) | |
download | mana-2f2443e9b2dab7c69c5713ece18b95f4b03e0e85.tar.gz mana-2f2443e9b2dab7c69c5713ece18b95f4b03e0e85.tar.bz2 mana-2f2443e9b2dab7c69c5713ece18b95f4b03e0e85.tar.xz mana-2f2443e9b2dab7c69c5713ece18b95f4b03e0e85.zip |
Prevented another possible segfault...
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r-- | src/resources/image.cpp | 3 |
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; |