From c04d3e46899194af3558f611af634dc7124ab7c2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 18 Aug 2010 20:41:03 +0000 Subject: SCI: Fixed bug #3041232 - "LB2Floppy: Crash at Museum" svn-id: r52197 --- engines/sci/engine/kpathing.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3