diff options
Diffstat (limited to 'engines/parallaction/location.cpp')
-rw-r--r-- | engines/parallaction/location.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index 522383de05..4e9bf11bf3 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -308,6 +308,9 @@ void switchBackground(char *name) { } extern Zone *_hoverZone; +extern Job *_jDrawLabel; +extern Job *_jEraseLabel; + void Parallaction::changeLocation(char *location) { debugC(1, kDebugLocation, "changeLocation to '%s'", location); @@ -350,6 +353,17 @@ void Parallaction::changeLocation(char *location) { debugC(2, kDebugLocation, "changeLocation: music stopped"); } + // WORKAROUND: this if-statement has been added to avoid crashes caused by + // execution of label jobs after a location switch. The other workaround in + // Parallaction::runGame should have been rendered useless by this one. + if (_jDrawLabel != NULL) { + removeJob(_jDrawLabel); + removeJob(_jEraseLabel); + _jDrawLabel = NULL; + _jEraseLabel = NULL; + } + + _hoverZone = NULL; if (_engineFlags & kEngineMouse) { changeCursor( kCursorArrow ); |