diff options
author | Jonathan Gray | 2003-05-22 11:40:20 +0000 |
---|---|---|
committer | Jonathan Gray | 2003-05-22 11:40:20 +0000 |
commit | aafa8c072217cfe5cef3f8dda25e8812780b49be (patch) | |
tree | d7159f480a1d5cff4d49982f5b050662ae93b035 /scumm | |
parent | a5be83b3529aab3cd9d73cb1f50f27f4029de668 (diff) | |
download | scummvm-rg350-aafa8c072217cfe5cef3f8dda25e8812780b49be.tar.gz scummvm-rg350-aafa8c072217cfe5cef3f8dda25e8812780b49be.tar.bz2 scummvm-rg350-aafa8c072217cfe5cef3f8dda25e8812780b49be.zip |
make drawSentence not crash on us
svn-id: r7823
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v2.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 3c3fc7daac..eb5456dea1 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -903,7 +903,11 @@ void Scumm_v2::o2_drawSentence() { if (!(_userState & 32)) return; - strcpy(sentence, (char*)getResourceAddress(rtVerb, slot)); + if (getResourceAddress(rtVerb, slot)) + strcpy(sentence, (char*)getResourceAddress(rtVerb, slot)); + else + return; + if (VAR(VAR_SENTENCE_OBJECT1) > 0) { temp = getObjOrActorName(VAR(VAR_SENTENCE_OBJECT1)); if (temp) { |