aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2016-07-30 11:57:50 -0500
committerColin Snover2016-07-30 11:57:50 -0500
commit6b6ee74f006890834223f28b24fce11a79245bb2 (patch)
treeb8ef0793dbeefba029077a63ab7a5961c6240128
parent3f9b95ac3effd9fac3ca002cc00d7da8958379ef (diff)
downloadscummvm-rg350-6b6ee74f006890834223f28b24fce11a79245bb2.tar.gz
scummvm-rg350-6b6ee74f006890834223f28b24fce11a79245bb2.tar.bz2
scummvm-rg350-6b6ee74f006890834223f28b24fce11a79245bb2.zip
SCI32: Fix crash in Torin when opening save dialog
-rw-r--r--engines/sci/graphics/controls32.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp
index 6b91bb4679..f4e9d26df4 100644
--- a/engines/sci/graphics/controls32.cpp
+++ b/engines/sci/graphics/controls32.cpp
@@ -115,7 +115,10 @@ reg_t GfxControls32::kernelEditText(const reg_t controlObject) {
reg_t planeObj = readSelector(_segMan, controlObject, SELECTOR(plane));
Plane *sourcePlane = g_sci->_gfxFrameout->getVisiblePlanes().findByObject(planeObj);
if (sourcePlane == nullptr) {
- error("Could not find plane %04x:%04x", PRINT_REG(planeObj));
+ sourcePlane = g_sci->_gfxFrameout->getPlanes().findByObject(planeObj);
+ if (sourcePlane == nullptr) {
+ error("Could not find plane %04x:%04x", PRINT_REG(planeObj));
+ }
}
editorPlaneRect.translate(sourcePlane->_gameRect.left, sourcePlane->_gameRect.top);