aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-08-18 20:41:03 +0000
committerFilippos Karapetis2010-08-18 20:41:03 +0000
commitc04d3e46899194af3558f611af634dc7124ab7c2 (patch)
tree48f9d5219e3fb7c41a665708d2fca37e867b20cf /engines/sci
parent3268238364d929863606821b2162604fa3cc2250 (diff)
downloadscummvm-rg350-c04d3e46899194af3558f611af634dc7124ab7c2.tar.gz
scummvm-rg350-c04d3e46899194af3558f611af634dc7124ab7c2.tar.bz2
scummvm-rg350-c04d3e46899194af3558f611af634dc7124ab7c2.zip
SCI: Fixed bug #3041232 - "LB2Floppy: Crash at Museum"
svn-id: r52197
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kpathing.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index d01fbcb47f..9c5973939e 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1186,7 +1186,9 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co
Node *node = s->_segMan->lookupNode(list->first);
while (node) {
- polygon = convert_polygon(s, node->value);
+ // The node value might be null, in which case there's no polygon to parse.
+ // Happens in LB2 floppy - refer to bug #3041232
+ polygon = !node->value.isNull() ? convert_polygon(s, node->value) : NULL;
if (polygon) {
pf_s->polygons.push_back(polygon);