office-gobmx/libvisio/libvisio-0.0.6-crash.patch
2011-09-03 16:53:48 +02:00

26 lines
1 KiB
Diff

--- misc/libvisio-0.0.6/src/lib/VSDXContentCollector.cpp 2011-08-31 11:10:40.000000000 +0200
+++ misc/build/libvisio-0.0.6/src/lib/VSDXContentCollector.cpp 2011-09-03 00:15:39.134916000 +0200
@@ -893,7 +893,13 @@
// Get stencil geometry so as to find stencil NURBS data ID
VSDXGeometryListElement * element = m_stencilShape->m_geometries[m_currentGeometryCount-1].getElement(id);
- dataID = dynamic_cast<VSDXNURBSTo2*>(element)->m_dataID;
+ VSDXNURBSTo2* tmpElement = dynamic_cast<VSDXNURBSTo2*>(element);
+ if (!tmpElement)
+ {
+ _handleLevelChange(level);
+ return;
+ }
+ dataID = tmpElement->m_dataID;
iter = m_stencilShape->m_nurbsData.find(dataID);
}
else // No stencils involved, directly get dataID and fill in missing parts
@@ -903,7 +909,7 @@
if (iter != m_NURBSData.end())
{
- data = iter->second;
+ data = iter->second;;
data.knots.push_back(knot);
data.knots.push_back(data.lastKnot);
data.knots.insert(data.knots.begin(), knotPrev);