[Scummvm-cvs-logs] SF.net SVN: scummvm:[39877] scummvm/trunk/engines/sci/gfx/res_view1.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Apr 6 19:15:35 CEST 2009


Revision: 39877
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39877&view=rev
Author:   thebluegr
Date:     2009-04-06 17:15:31 +0000 (Mon, 06 Apr 2009)

Log Message:
-----------
Fixed a crash in LSL5 when opening the inventory

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/res_view1.cpp

Modified: scummvm/trunk/engines/sci/gfx/res_view1.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_view1.cpp	2009-04-06 17:13:07 UTC (rev 39876)
+++ scummvm/trunk/engines/sci/gfx/res_view1.cpp	2009-04-06 17:15:31 UTC (rev 39877)
@@ -206,7 +206,8 @@
 	retval->color_key = cel_base[isSci11 ? 8 : 6];
 	retval->xoffset = (mirrored) ? xdisplace : -xdisplace;
 	retval->yoffset = -ydisplace;
-	retval->palette = view ? view->palette->getref() : NULL;
+	// FIXME: In LSL5, it seems that the inventory has views without palettes (or we don't load palettes properly)
+	retval->palette = (view && view->palette) ? view->palette->getref() : NULL;
 
 	if (xl <= 0 || yl <= 0) {
 		gfx_free_pixmap(retval);


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