[Scummvm-cvs-logs] scummvm master -> f889457d3d7952b97e1e6be5a70ad20ec832f6e5
clone2727
clone2727 at gmail.com
Sun Dec 16 04:22:45 CET 2012
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f889457d3d PEGASUS: Fix segfault when pressing 'i' during the space chase
Commit: f889457d3d7952b97e1e6be5a70ad20ec832f6e5
https://github.com/scummvm/scummvm/commit/f889457d3d7952b97e1e6be5a70ad20ec832f6e5
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-12-15T19:19:15-08:00
Commit Message:
PEGASUS: Fix segfault when pressing 'i' during the space chase
Thanks to digitall for finding this one
Changed paths:
engines/pegasus/pegasus.cpp
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 502a79e..98f0553 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -1428,6 +1428,10 @@ void PegasusEngine::switchGameMode(const GameMode newMode, const GameMode oldMod
}
bool PegasusEngine::canSwitchGameMode(const GameMode newMode, const GameMode oldMode) {
+ // WORKAROUND: Don't allow game mode switches when the interface is not set up.
+ // Prevents segfaults when pressing 'i' when in the space chase.
+ if (!g_interface)
+ return false;
if (newMode == kModeInventoryPick && oldMode == kModeBiochipPick)
return false;
if (newMode == kModeBiochipPick && oldMode == kModeInventoryPick)
More information about the Scummvm-git-logs
mailing list