mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 19:32:11 +00:00
GOB: fix a crash in Adibou2 when changing hotspot
The leave function should not be called for hotspot "0"
This commit is contained in:
parent
95ddb1ca87
commit
b2c3510758
@ -811,12 +811,13 @@ uint16 Hotspots::check(uint8 handleMouse, int16 delay, uint16 &id, uint16 &index
|
||||
((delay <= 0) || (_vm->_game->_mouseButtons == kMouseButtonsNone)))
|
||||
_vm->_draw->blitCursor();
|
||||
|
||||
|
||||
if ((key != _currentKey) && (_vm->getGameType() != kGameTypeFascination) &&
|
||||
(_vm->getGameType() != kGameTypeGeisha))
|
||||
// If the hotspot changed, leave the old one
|
||||
// Code not present in Fascination executables
|
||||
leave(_currentIndex);
|
||||
if ((_currentKey != 0) &&
|
||||
(key != _currentKey) &&
|
||||
(_vm->getGameType() != kGameTypeFascination) &&
|
||||
(_vm->getGameType() != kGameTypeGeisha))
|
||||
// If the hotspot changed, leave the old one
|
||||
// Code not present in Fascination executables
|
||||
leave(_currentIndex);
|
||||
|
||||
_currentKey = 0;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user