aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-04-06 17:15:31 +0000
committerFilippos Karapetis2009-04-06 17:15:31 +0000
commit2ab995557723d87c2e616973179cc712896bcf6a (patch)
tree75e26b1c39923db0f4fccec3600a73378ffcaaf4 /engines
parentfe1584c140d911ebe86a1afe5a39882b705ebfaf (diff)
downloadscummvm-rg350-2ab995557723d87c2e616973179cc712896bcf6a.tar.gz
scummvm-rg350-2ab995557723d87c2e616973179cc712896bcf6a.tar.bz2
scummvm-rg350-2ab995557723d87c2e616973179cc712896bcf6a.zip
Fixed a crash in LSL5 when opening the inventory
svn-id: r39877
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gfx/res_view1.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sci/gfx/res_view1.cpp b/engines/sci/gfx/res_view1.cpp
index 68f5ad4cff..3bf10cb7de 100644
--- a/engines/sci/gfx/res_view1.cpp
+++ b/engines/sci/gfx/res_view1.cpp
@@ -206,7 +206,8 @@ gfx_pixmap_t *gfxr_draw_cel1(int id, int loop, int cel, int mirrored, byte *reso
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);