mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 09:56:30 +00:00
applied 2nd workaround to avoid crashes caused by labels when switching location
svn-id: r25388
This commit is contained in:
parent
f54a97a02c
commit
890ee97285
@ -308,6 +308,9 @@ void switchBackground(char *name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern Zone *_hoverZone;
|
extern Zone *_hoverZone;
|
||||||
|
extern Job *_jDrawLabel;
|
||||||
|
extern Job *_jEraseLabel;
|
||||||
|
|
||||||
|
|
||||||
void Parallaction::changeLocation(char *location) {
|
void Parallaction::changeLocation(char *location) {
|
||||||
debugC(1, kDebugLocation, "changeLocation to '%s'", location);
|
debugC(1, kDebugLocation, "changeLocation to '%s'", location);
|
||||||
@ -350,6 +353,17 @@ void Parallaction::changeLocation(char *location) {
|
|||||||
debugC(2, kDebugLocation, "changeLocation: music stopped");
|
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;
|
_hoverZone = NULL;
|
||||||
if (_engineFlags & kEngineMouse) {
|
if (_engineFlags & kEngineMouse) {
|
||||||
changeCursor( kCursorArrow );
|
changeCursor( kCursorArrow );
|
||||||
|
@ -138,8 +138,8 @@ uint16 _introSarcData2 = 1;
|
|||||||
|
|
||||||
|
|
||||||
static Job *_jDrawInventory = NULL;
|
static Job *_jDrawInventory = NULL;
|
||||||
static Job *_jDrawLabel = NULL;
|
Job *_jDrawLabel = NULL;
|
||||||
static Job *_jEraseLabel = NULL;
|
Job *_jEraseLabel = NULL;
|
||||||
Zone *_hoverZone = NULL;
|
Zone *_hoverZone = NULL;
|
||||||
static Job *_jRunScripts = NULL;
|
static Job *_jRunScripts = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user