diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compoundsprite.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp index e391a6f87..2792e20bb 100644 --- a/src/compoundsprite.cpp +++ b/src/compoundsprite.cpp @@ -391,9 +391,15 @@ void CompoundSprite::redraw() const mImage = Image::load(surface); SDL_FreeSurface(surface); - mAlphaImage = Image::load(surfaceA); - SDL_FreeSurface(surfaceA); - + if (mAlpha != 1.0f) + { + mAlphaImage = Image::load(surfaceA); + SDL_FreeSurface(surfaceA); + } + else + { + mAlphaImage = 0; + } } void CompoundSprite::setAlpha(float alpha) |