blob: c1384cb6e7fff8061b81a2882f352c87790cdf30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--- 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);
|