summaryrefslogtreecommitdiff
path: root/src/text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/text.cpp b/src/text.cpp
index 545c1c0e..7967b56f 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -100,3 +100,14 @@ void FlashText::draw(Graphics *graphics, int xOff, int yOff)
}
Text::draw(graphics, xOff, yOff);
}
+
+FlashText::~FlashText()
+{
+ mTime = 0;
+ textManager->removeText(this);
+ if (--mInstances == 0)
+ {
+ delete textManager;
+ textManager = 0;
+ }
+}