[Scummvm-cvs-logs] SF.net SVN: scummvm:[52693] scummvm/trunk/engines/sci/engine/script.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Sep 12 23:50:53 CEST 2010
Revision: 52693
http://scummvm.svn.sourceforge.net/scummvm/?rev=52693&view=rev
Author: thebluegr
Date: 2010-09-12 21:50:52 +0000 (Sun, 12 Sep 2010)
Log Message:
-----------
SCI: Bugfix for rev #52688.
We can't just set the lockers of script 0 to 1, as at that point
the objects associated with the script are marked to be deleted,
thus we need to reload the script
Revision Links:
--------------
http://scummvm.svn.sourceforge.net/scummvm/?rev=52688&view=rev
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/script.cpp
Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp 2010-09-12 21:35:49 UTC (rev 52692)
+++ scummvm/trunk/engines/sci/engine/script.cpp 2010-09-12 21:50:52 UTC (rev 52693)
@@ -314,11 +314,20 @@
// WORKAROUND for bug #3038837: HOYLE3: EGA/VGA Crashes
// This is caused by script 0 lockers reaching zero. Since
// this should never happen, I'm confident in making this a
- // non-specific fix.
+ // non-specific fix. We can't just reset lockers to 1, because
+ // the objects associated with the script are already marked
+ // to be deleted at this point, thus we need to reload the
+ // script itself. If we don't, the game will surely error
+ // out later on, because of objects associated with this
+ // script which are incorrectly marked to be deleted. For
+ // example, in Hoyle 3, if you exit Checkers and reenter
+ // checkers, the game will crash when selecting a player.
//
// TODO: Figure out why this happens, and fix it properly!
- if (_nr == 0 && _lockers == 0)
- _lockers++;
+ if (_nr == 0 && _lockers == 0) {
+ init(0, g_sci->getResMan());
+ load(g_sci->getResMan());
+ }
}
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