[Scummvm-cvs-logs] SF.net SVN: scummvm:[52174] scummvm/trunk/engines/sci/engine/kpathing.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Aug 18 00:51:24 CEST 2010
Revision: 52174
http://scummvm.svn.sourceforge.net/scummvm/?rev=52174&view=rev
Author: thebluegr
Date: 2010-08-17 22:51:24 +0000 (Tue, 17 Aug 2010)
Log Message:
-----------
SCI: Fixed bug #3034501 - "LSL6: Segfault while leaving the penthouse"
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kpathing.cpp
Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp 2010-08-17 20:58:01 UTC (rev 52173)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp 2010-08-17 22:51:24 UTC (rev 52174)
@@ -1106,6 +1106,12 @@
}
}
+ // Check if the target polygon is still valid. It may have been released
+ // in the meantime (e.g. in LSL6, room 700, when using the elevator).
+ // Refer to bug #3034501.
+ if (segMan->getSegmentType(points.segment) != SEG_TYPE_DYNMEM)
+ return NULL;
+
for (i = skip; i < size; i++) {
Vertex *vertex = new Vertex(read_point(segMan, points, i));
poly->vertices.insertHead(vertex);
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