summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compoundsprite.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index 6f80e2c7b..1642416ea 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -406,13 +406,15 @@ void CompoundSprite::setAlpha(float alpha)
{
if (alpha != mAlpha)
{
- SpriteConstIterator it, it_end;
- for (it = begin(), it_end = end(); it != it_end; ++ it)
+ if (Image::mUseOpenGL == 0 && size() > 3)
{
- if (*it)
- (*it)->setAlpha(alpha);
+ SpriteConstIterator it, it_end;
+ for (it = begin(), it_end = end(); it != it_end; ++ it)
+ {
+ if (*it)
+ (*it)->setAlpha(alpha);
+ }
}
-
mAlpha = alpha;
}
}