summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2015-07-17 15:52:12 +0200
committerDavid Tardon <dtardon@redhat.com>2015-07-17 15:52:12 +0200
commitbafa63b6c6c9f620bff667d48668aa80df843cea (patch)
tree2050daad6d0d3ab3fe36faa41a42264412799a7a
parent1c71f0a300b012cca709662823e9cbfa85fb7b36 (diff)
avoid null ptr deref.
Change-Id: I55fe94df71bda97ba5e4e8fe14160c27befe1a0b
-rw-r--r--src/lib/VSDParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 3cb284a..6ce32eb 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -866,7 +866,7 @@ void libvisio::VSDParser::readTextBlock(librevenge::RVNGInputStream *input)
void libvisio::VSDParser::readGeomList(librevenge::RVNGInputStream *input)
{
- if (!m_shape.m_geometries.empty() && m_currentGeometryList->empty())
+ if (!m_shape.m_geometries.empty() && m_currentGeometryList && m_currentGeometryList->empty())
m_shape.m_geometries.erase(--m_currentGeomListCount);
// Since this is a map, this will default construct an element and then
// the m_currentGeometryList pointer takes its address and we will work