diff options
author | Bastien Bouclet | 2017-08-29 21:34:51 +0200 |
---|---|---|
committer | Bastien Bouclet | 2017-09-12 20:25:24 +0200 |
commit | 8e235f07a762ea281d0ce366242522b84c518e3b (patch) | |
tree | 32cdc29bfcfe7cd622618bbff81d3f3d10250547 /engines/pegasus/neighborhood | |
parent | 731028460fe37f534118ba1d30380460f1f9de80 (diff) | |
download | scummvm-rg350-8e235f07a762ea281d0ce366242522b84c518e3b.tar.gz scummvm-rg350-8e235f07a762ea281d0ce366242522b84c518e3b.tar.bz2 scummvm-rg350-8e235f07a762ea281d0ce366242522b84c518e3b.zip |
PEGASUS: Disallow loading / saving from the GMM from inner loops
InputDeviceManager::pumpEvents is called from neighborhood classes that
are destroyed when loading.
Don't allow loading from that method to prevent use after free bugs.
Diffstat (limited to 'engines/pegasus/neighborhood')
-rw-r--r-- | engines/pegasus/neighborhood/mars/mars.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/pegasus/neighborhood/mars/mars.cpp b/engines/pegasus/neighborhood/mars/mars.cpp index 432909596e..6e3795d250 100644 --- a/engines/pegasus/neighborhood/mars/mars.cpp +++ b/engines/pegasus/neighborhood/mars/mars.cpp @@ -2422,9 +2422,7 @@ void Mars::doCanyonChase() { _vm->drawScaledFrame(frame, 0, 0); } - Common::Event event; - while (g_system->getEventManager()->pollEvent(event)) - ; + InputDevice.pumpEvents(); g_system->delayMillis(10); } @@ -3055,9 +3053,7 @@ void Mars::transportToRobotShip() { _vm->drawScaledFrame(frame, 0, 0); } - Common::Event event; - while (g_system->getEventManager()->pollEvent(event)) - ; + InputDevice.pumpEvents(); g_system->delayMillis(10); } |