summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2012-06-08 17:15:14 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-06-08 17:15:14 +0200
commit9316bd4bdd8f7ee21df91e5532566c34906043af (patch)
treec0fc3d095a606548a5782e8278197ad7c52cf920
parentd09261a89a0cbd829e73941c4920ff8385fcf7f6 (diff)
Fix some crashes on windows
-rw-r--r--src/lib/VSDXContentCollector.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/VSDXContentCollector.cpp b/src/lib/VSDXContentCollector.cpp
index ec25fb4..8607b02 100644
--- a/src/lib/VSDXContentCollector.cpp
+++ b/src/lib/VSDXContentCollector.cpp
@@ -2059,7 +2059,11 @@ void libvisio::VSDXContentCollector::collectNameList(unsigned /*id*/, unsigned l
void libvisio::VSDXContentCollector::_convertDataToString(WPXString &result, const WPXBinaryData &data, TextFormat format)
{
+ if (!data.size())
+ return;
WPXInputStream *pStream = const_cast<WPXInputStream *>(data.getDataStream());
+ if (!pStream)
+ return;
if (format == VSD_TEXT_ANSI)
{
while (!pStream->atEOS())