aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-05-04 11:22:56 -0400
committerMatthew Hoops2012-05-04 11:22:56 -0400
commit68438a2919df2756942193d9b1b77496828fd45a (patch)
treebe39b284c373d3ef2e4bf443fe075500f59035ad
parent99eb8762c4cd46357288c2d47ec719c48ada4d80 (diff)
downloadscummvm-rg350-68438a2919df2756942193d9b1b77496828fd45a.tar.gz
scummvm-rg350-68438a2919df2756942193d9b1b77496828fd45a.tar.bz2
scummvm-rg350-68438a2919df2756942193d9b1b77496828fd45a.zip
PEGASUS: Add a workaround for the canyon/space chase segfault
-rw-r--r--engines/pegasus/pegasus.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 225bcbc35f..d2d1973a66 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -575,6 +575,13 @@ bool PegasusEngine::writeToStream(Common::WriteStream *stream, int saveType) {
}
void PegasusEngine::makeContinuePoint() {
+ // WORKAROUND: Do not attempt to make a continue point if the interface is not set
+ // up. The original did *not* do this and attempting to restore the game using the pause
+ // menu during the canyon/space chase sequence would segfault the game and crash the
+ // system. Nice!
+ if (!g_interface)
+ return;
+
delete _continuePoint;
Common::MemoryWriteStreamDynamic newPoint(DisposeAfterUse::NO);