aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--queen/talk.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/queen/talk.cpp b/queen/talk.cpp
index 029bc7a727..182373b8b9 100644
--- a/queen/talk.cpp
+++ b/queen/talk.cpp
@@ -59,7 +59,11 @@ bool Talk::speak(
Resource *resource,
Sound *sound) {
Talk *talk = new Talk(graphics, input, logic, resource, sound);
- bool result = talk->speak(sentence, person, voiceFilePrefix);
+ bool result;
+ if (sentence)
+ result = talk->speak(sentence, person, voiceFilePrefix);
+ else
+ result = false;
delete talk;
return result;
}