[Scummvm-cvs-logs] SF.net SVN: scummvm:[54549] scummvm/trunk/engines/toon/character.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Nov 28 21:53:57 CET 2010


Revision: 54549
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54549&view=rev
Author:   eriktorbjorn
Date:     2010-11-28 20:53:57 +0000 (Sun, 28 Nov 2010)

Log Message:
-----------
TOON: Attempt to fix crash when Bricabrac puts on his glasses

This was a regression in r45223, and it's the most direct fix I can
think of. The problem seems to be that sys_Cmd_Remove_Scene_Anim()
clears the character's _animationInstance while character::playAnim()
is waiting "for the character to be ready".

My fix was to treat _animationInstance NULL as another sign that the
wait is over, but maybe the real fix is for sys_Cmd_Remove_Scene_Anim()
to do more than just clear the variable, e.g. stop the script or
something like that?

Modified Paths:
--------------
    scummvm/trunk/engines/toon/character.cpp

Modified: scummvm/trunk/engines/toon/character.cpp
===================================================================
--- scummvm/trunk/engines/toon/character.cpp	2010-11-28 19:24:44 UTC (rev 54548)
+++ scummvm/trunk/engines/toon/character.cpp	2010-11-28 20:53:57 UTC (rev 54549)
@@ -1030,7 +1030,7 @@
 		_flags |= 1;
 
 		// wait for the character to be ready
-		while (_animScriptId != -1 && _animationInstance->getFrame() > 0 && (_specialAnim && _animationInstance->getAnimation() != _specialAnim)) {
+		while (_animScriptId != -1 && _animationInstance && _animationInstance->getFrame() > 0 && (_specialAnim && _animationInstance->getAnimation() != _specialAnim)) {
 			_vm->simpleUpdate(false);
 		}
 	}


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