From 68438a2919df2756942193d9b1b77496828fd45a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 4 May 2012 11:22:56 -0400 Subject: PEGASUS: Add a workaround for the canyon/space chase segfault --- engines/pegasus/pegasus.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines') 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); -- cgit v1.2.3