diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-09-03 00:19:03 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-09-03 16:53:48 +0200 |
commit | 76048bba1cc3635b558813688020f68220934549 (patch) | |
tree | 055c70541080de2c35094ec0e4613454dcd650ce /libvisio | |
parent | 649e0f731a707677b1fda0fe155e581ecb8946a3 (diff) |
Add a patch to prevent some null pointer crash
Diffstat (limited to 'libvisio')
-rw-r--r-- | libvisio/libvisio-0.0.6-crash.patch | 26 | ||||
-rw-r--r-- | libvisio/makefile.mk | 2 |
2 files changed, 27 insertions, 1 deletions
diff --git a/libvisio/libvisio-0.0.6-crash.patch b/libvisio/libvisio-0.0.6-crash.patch new file mode 100644 index 000000000000..c1384cb6e7ff --- /dev/null +++ b/libvisio/libvisio-0.0.6-crash.patch @@ -0,0 +1,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); diff --git a/libvisio/makefile.mk b/libvisio/makefile.mk index 611bbaa12d0b..29ca54b13c24 100644 --- a/libvisio/makefile.mk +++ b/libvisio/makefile.mk @@ -58,7 +58,7 @@ TARFILE_NAME=libvisio-0.0.6 TARFILE_MD5=8c50b6c3e4b323013164f4a6d8d74dc6 PATCH_FILES=\ - libvisio-0.0.6.patch + libvisio-0.0.6.patch libvisio-0.0.6-crash.patch BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) |