summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index cfb182355..95142fecc 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1760,13 +1760,18 @@ void Being::nextTile() restrict2
void Being::logic() restrict2
{
BLOCK_START("Being::logic")
- // Reduce the time that speech is still displayed
- if (mSpeechTime > 0)
+ if (A_UNLIKELY(mSpeechTime != 0))
+ {
mSpeechTime--;
-
- // Remove text and speechbubbles if speech boxes aren't being used
- if (mSpeechTime == 0 && mText)
- delete2(mText)
+ if (mSpeechTime == 0 && mText != nullptr)
+ {
+ delete2(mText)
+ }
+ else if (mText != nullptr)
+ {
+ delete2(mText)
+ }
+ }
const int time = tick_time * MILLISECONDS_IN_A_TICK;
if (mEmotionSprite)