diff options
author | Joost Peters | 2003-11-07 00:54:41 +0000 |
---|---|---|
committer | Joost Peters | 2003-11-07 00:54:41 +0000 |
commit | 709c3262766e41370710dc954ef68d5538da55ff (patch) | |
tree | fff041ef28203445fbe9c5aa6853d83293bd4d01 | |
parent | 0bae086c7b2eecbb5b3a37f35f22579691f4bdc5 (diff) | |
download | scummvm-rg350-709c3262766e41370710dc954ef68d5538da55ff.tar.gz scummvm-rg350-709c3262766e41370710dc954ef68d5538da55ff.tar.bz2 scummvm-rg350-709c3262766e41370710dc954ef68d5538da55ff.zip |
Don't try to speak NULL strings, this fixes atleast 1 crash. (looking out the hotel window)
svn-id: r11173
-rw-r--r-- | queen/talk.cpp | 6 |
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; } |