diff options
author | Willem Jan Palenstijn | 2010-10-03 23:56:17 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2010-10-03 23:56:17 +0000 |
commit | d1fb1d5b2671f777e0e4ec7fceecfe6c4585858b (patch) | |
tree | 9d3ed2ba31ef6ed9e01f5be2f623e01f10474253 /engines/sci | |
parent | 27745c2143f5e79a0eb12d2b9aa19202d21637fb (diff) | |
download | scummvm-rg350-d1fb1d5b2671f777e0e4ec7fceecfe6c4585858b.tar.gz scummvm-rg350-d1fb1d5b2671f777e0e4ec7fceecfe6c4585858b.tar.bz2 scummvm-rg350-d1fb1d5b2671f777e0e4ec7fceecfe6c4585858b.zip |
SCI: Fix AltInput crash in non-parser games
svn-id: r53008
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/graphics/controls.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp index e4e7bc0c92..66376a793c 100644 --- a/engines/sci/graphics/controls.cpp +++ b/engines/sci/graphics/controls.cpp @@ -225,7 +225,7 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) { } } - if (!textChanged && oldCursorPos != cursorPos) { + if (g_sci->getVocabulary() && !textChanged && oldCursorPos != cursorPos) { assert(!textAddChar); textChanged = g_sci->getVocabulary()->checkAltInput(text, cursorPos); } @@ -257,7 +257,8 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) { // Note: the following checkAltInput call might make the text // too wide to fit, but SSCI fails to check that too. } - g_sci->getVocabulary()->checkAltInput(text, cursorPos); + if (g_sci->getVocabulary()) + g_sci->getVocabulary()->checkAltInput(text, cursorPos); texteditCursorErase(); _paint16->eraseRect(rect); _text16->Box(text.c_str(), 0, rect, SCI_TEXT16_ALIGNMENT_LEFT, -1); |