diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-06-15 22:14:33 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-06-15 22:14:33 +0200 |
commit | b53f31e4615740c676621680312334aba7397933 (patch) | |
tree | 569b0d362c23a05f279bf72b23caf4eb2031d0d0 | |
parent | ecc69c362daf5d0dc623f2cd11ffbddf9f30e845 (diff) |
Resolves: fdo#50988
-rw-r--r-- | src/lib/VSDXContentCollector.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/VSDXContentCollector.cpp b/src/lib/VSDXContentCollector.cpp index cacf51d..1e18a5e 100644 --- a/src/lib/VSDXContentCollector.cpp +++ b/src/lib/VSDXContentCollector.cpp @@ -1601,6 +1601,7 @@ void libvisio::VSDXContentCollector::collectPolylineTo(unsigned /* id */ , unsig void libvisio::VSDXContentCollector::collectPolylineTo(unsigned id, unsigned level, double x, double y, unsigned dataID) { std::map<unsigned, PolylineData>::const_iterator iter; + std::map<unsigned, PolylineData>::const_iterator iterEnd; if (dataID == 0xFFFFFFFE) // Use stencil polyline data { if (!m_stencilShape || m_stencilShape->m_geometries.size() < m_currentGeometryCount) @@ -1613,13 +1614,15 @@ void libvisio::VSDXContentCollector::collectPolylineTo(unsigned id, unsigned lev VSDXGeometryListElement *element = m_stencilShape->m_geometries[m_currentGeometryCount-1].getElement(id); dataID = dynamic_cast<VSDXPolylineTo2 *>(element)->m_dataID; iter = m_stencilShape->m_polylineData.find(dataID); + iterEnd = m_stencilShape->m_polylineData.end(); } else // No stencils involved, directly get dataID { iter = m_polylineData.find(dataID); + iterEnd = m_polylineData.end(); } - if (iter != m_polylineData.end()) + if (iter != iterEnd) { PolylineData data = iter->second; collectPolylineTo(id, level, x, y, data.xType, data.yType, data.points); |