summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2015-07-15 18:40:17 +0200
committerDavid Tardon <dtardon@redhat.com>2015-07-15 18:40:17 +0200
commitdb36f1a63b9d046f437e44072f43ff9bedcbd283 (patch)
treecfdf8f27aede74e3e9e57a1d42ef20cf341e1814
parent75d144e106c82aeaa610be1279215b0a4d0b1c5b (diff)
afl: avoid null dereference
Change-Id: I37a3295a82bdc29fa38cf24b8d5005d992699214
-rw-r--r--src/lib/VSDXParser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
index 23fc541..9cb62e6 100644
--- a/src/lib/VSDXParser.cpp
+++ b/src/lib/VSDXParser.cpp
@@ -421,7 +421,7 @@ void libvisio::VSDXParser::processXmlNode(xmlTextReaderPtr reader)
readShapeProperties(reader);
else
{
- if (m_isStencilStarted)
+ if (m_isStencilStarted && m_currentStencil)
m_currentStencil->addStencilShape(m_shape.m_shapeId, m_shape);
else
_flushShape();
@@ -432,7 +432,7 @@ void libvisio::VSDXParser::processXmlNode(xmlTextReaderPtr reader)
}
else if (XML_READER_TYPE_END_ELEMENT == tokenType)
{
- if (m_isStencilStarted)
+ if (m_isStencilStarted && m_currentStencil)
m_currentStencil->addStencilShape(m_shape.m_shapeId, m_shape);
else
{
@@ -636,7 +636,7 @@ void libvisio::VSDXParser::readPageSheetProperties(xmlTextReaderPtr reader)
}
while ((XML_PAGESHEET != tokenId || XML_READER_TYPE_END_ELEMENT != tokenType) && 1 == ret);
- if (m_isStencilStarted)
+ if (m_isStencilStarted && m_currentStencil)
{
m_currentStencil->m_shadowOffsetX = shadowOffsetX;
m_currentStencil->m_shadowOffsetY = shadowOffsetY;