[Scummvm-cvs-logs] SF.net SVN: scummvm:[39444] scummvm/trunk/engines/parallaction/parallaction .cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Mon Mar 16 10:38:20 CET 2009


Revision: 39444
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39444&view=rev
Author:   Kirben
Date:     2009-03-16 09:38:20 +0000 (Mon, 16 Mar 2009)

Log Message:
-----------
Fix crash regression in BRA introduction for now.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/parallaction.cpp

Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp	2009-03-16 09:17:49 UTC (rev 39443)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp	2009-03-16 09:38:20 UTC (rev 39444)
@@ -166,20 +166,22 @@
 	if (canScroll()) {
 		scrollX = _gfx->getScrollPos();
 
-		Common::Point foot;
-		_char._ani->getFoot(foot);
+		if (_char._ani->gfxobj) {
+			Common::Point foot;
+			_char._ani->getFoot(foot);
 
-		foot.x -= scrollX;
-		//foot.y -= ...
+			foot.x -= scrollX;
+			//foot.y -= ...
 
-		int min = SCROLL_BAND_WIDTH;
-		int max = _screenWidth - SCROLL_BAND_WIDTH;
+			int min = SCROLL_BAND_WIDTH;
+			int max = _screenWidth - SCROLL_BAND_WIDTH;
 
-		if (foot.x < min) {
-			scrollX -= (min - foot.x);
-		} else
-		if (foot.x > max) {
-			scrollX += (foot.x - max);
+			if (foot.x < min) {
+				scrollX -= (min - foot.x);
+			} else
+			if (foot.x > max) {
+				scrollX += (foot.x - max);
+			}
 		}
 	}
 	_gfx->setScrollPos(scrollX);


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