[Libreoffice-commits] libvisio.git: src/lib
David Tardon
dtardon at redhat.com
Tue Jul 29 09:20:28 PDT 2014
src/lib/VisioDocument.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit ecd8101f3dd47a01c57e6e1e2c8f72aa31993358
Author: David Tardon <dtardon at redhat.com>
Date: Tue Jul 29 18:19:10 2014 +0200
check arguments
Change-Id: I23cf6e3c04100ec021f913171bb469a221515584
diff --git a/src/lib/VisioDocument.cpp b/src/lib/VisioDocument.cpp
index be14b68..951fb28 100644
--- a/src/lib/VisioDocument.cpp
+++ b/src/lib/VisioDocument.cpp
@@ -322,6 +322,9 @@ stream is a Visio Document that libvisio able to parse
*/
VSDAPI bool libvisio::VisioDocument::isSupported(librevenge::RVNGInputStream *input)
{
+ if (!input)
+ return false;
+
if (isBinaryVisioDocument(input))
return true;
if (isOpcVisioDocument(input))
@@ -341,6 +344,9 @@ librevenge::RVNGDrawingInterface class implementation when needed. This is often
*/
VSDAPI bool libvisio::VisioDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
{
+ if (!input || !painter)
+ return false;
+
if (isBinaryVisioDocument(input))
{
if (parseBinaryVisioDocument(input, painter, false))
@@ -372,6 +378,9 @@ when needed.
*/
VSDAPI bool libvisio::VisioDocument::parseStencils(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
{
+ if (!input || !painter)
+ return false;
+
if (isBinaryVisioDocument(input))
{
if (parseBinaryVisioDocument(input, painter, true))
More information about the Libreoffice-commits
mailing list