[Scummvm-cvs-logs] SF.net SVN: scummvm: [29263] scummvm/trunk/engines/parallaction/ parallaction_ns.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Fri Oct 26 22:35:07 CEST 2007
Revision: 29263
http://scummvm.svn.sourceforge.net/scummvm/?rev=29263&view=rev
Author: peres001
Date: 2007-10-26 13:35:06 -0700 (Fri, 26 Oct 2007)
Log Message:
-----------
Parallaction will now consume all the short-lived jobs in the queue before a location switch. These jobs only live for 1 or 2 engine loops, and can refer to items in the location being dropped. This situation used to lead to segfaults like the one reported in report #1762797 (that should be now fixed).
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/parallaction_ns.cpp
Modified: scummvm/trunk/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2007-10-26 13:12:18 UTC (rev 29262)
+++ scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2007-10-26 20:35:06 UTC (rev 29263)
@@ -257,6 +257,12 @@
_animations.remove(&_char._ani);
+ // WORKAROUND: eat up any pending short-lived job that may be referring to the
+ // current location before the actual switch is performed, or engine may
+ // segfault because of invalid pointers.
+ runJobs();
+ runJobs();
+
freeLocation();
char buf[100];
strcpy(buf, location);
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