diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-06-08 17:15:14 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-06-08 17:15:14 +0200 |
commit | 9316bd4bdd8f7ee21df91e5532566c34906043af (patch) | |
tree | c0fc3d095a606548a5782e8278197ad7c52cf920 | |
parent | d09261a89a0cbd829e73941c4920ff8385fcf7f6 (diff) |
Fix some crashes on windows
-rw-r--r-- | src/lib/VSDXContentCollector.cpp | 4 |
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()) |