[Scummvm-cvs-logs] SF.net SVN: scummvm: [25388] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Feb 4 16:48:51 CET 2007
Revision: 25388
http://scummvm.svn.sourceforge.net/scummvm/?rev=25388&view=rev
Author: peres001
Date: 2007-02-04 07:48:51 -0800 (Sun, 04 Feb 2007)
Log Message:
-----------
applied 2nd workaround to avoid crashes caused by labels when switching location
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/location.cpp
scummvm/trunk/engines/parallaction/parallaction.cpp
Modified: scummvm/trunk/engines/parallaction/location.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/location.cpp 2007-02-04 15:45:15 UTC (rev 25387)
+++ scummvm/trunk/engines/parallaction/location.cpp 2007-02-04 15:48:51 UTC (rev 25388)
@@ -308,7 +308,10 @@
}
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 @@
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 );
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2007-02-04 15:45:15 UTC (rev 25387)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2007-02-04 15:48:51 UTC (rev 25388)
@@ -138,8 +138,8 @@
static Job *_jDrawInventory = NULL;
-static Job *_jDrawLabel = NULL;
-static Job *_jEraseLabel = NULL;
+Job *_jDrawLabel = NULL;
+Job *_jEraseLabel = NULL;
Zone *_hoverZone = NULL;
static Job *_jRunScripts = NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list