[Scummvm-cvs-logs] SF.net SVN: scummvm:[47930] scummvm/trunk/engines/sci/graphics/compare.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Feb 6 16:59:00 CET 2010
Revision: 47930
http://scummvm.svn.sourceforge.net/scummvm/?rev=47930&view=rev
Author: thebluegr
Date: 2010-02-06 15:58:59 +0000 (Sat, 06 Feb 2010)
Log Message:
-----------
Don't try and manipulate invalid views (i.e. views with view ID -1/65535, which are most likely the currently missing dynamically constructed text views). Torin chapter 1 starts now (and dies shortly afterwards, but that's a different issue)
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/compare.cpp
Modified: scummvm/trunk/engines/sci/graphics/compare.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.cpp 2010-02-06 12:50:50 UTC (rev 47929)
+++ scummvm/trunk/engines/sci/graphics/compare.cpp 2010-02-06 15:58:59 UTC (rev 47930)
@@ -116,6 +116,9 @@
GfxView *view = NULL;
Common::Rect celRect(0, 0);
GuiResourceId viewId = (GuiResourceId)GET_SEL32V(_segMan, objectReference, SELECTOR(view));
+ if (viewId == 0xFFFF) // invalid view
+ return;
+
int16 loopNo = GET_SEL32V(_segMan, objectReference, SELECTOR(loop));
int16 celNo = GET_SEL32V(_segMan, objectReference, SELECTOR(cel));
int16 x = (int16)GET_SEL32V(_segMan, objectReference, SELECTOR(x));
@@ -182,6 +185,9 @@
int16 loopNo = GET_SEL32V(_segMan, object, SELECTOR(loop));
int16 celNo = GET_SEL32V(_segMan, object, SELECTOR(cel));
+ if (viewId == 0xFFFF) // invalid view
+ return;
+
GfxView *tmpView = _cache->getView(viewId);
Common::Rect celRect;
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