summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-07-29 19:02:46 +0200
committerDavid Tardon <dtardon@redhat.com>2014-07-29 19:02:46 +0200
commit79586a2932b51568c76e46b1c0c0559840b5a6ac (patch)
tree6bab5bcaf164c84449f6def2fd47b8b3d9b0afb8 /src
parent783e0d657bf2355527d3927d7e84df4f75485176 (diff)
check arguments
Diffstat (limited to 'src')
-rw-r--r--src/lib/WT602Document.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/WT602Document.cpp b/src/lib/WT602Document.cpp
index efc7733..e9745e8 100644
--- a/src/lib/WT602Document.cpp
+++ b/src/lib/WT602Document.cpp
@@ -37,6 +37,9 @@ RVNGInputStreamPtr getContent(librevenge::RVNGInputStream *const ip)
bool WT602Document::isSupported(librevenge::RVNGInputStream *input) try
{
+ if (!input)
+ return false;
+
RVNGInputStreamPtr content = getContent(input);
if (bool(content))
{
@@ -54,6 +57,9 @@ catch (...)
bool WT602Document::parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document) try
{
+ if (!input || !document)
+ return false;
+
if (!WT602Document::isSupported(input))
return false;