summaryrefslogtreecommitdiff
path: root/poppler/FileSpec.cc
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2012-08-30 00:34:06 +0200
committerAlbert Astals Cid <aacid@kde.org>2012-08-30 00:45:27 +0200
commitc1fba45be106dc30a5136efe41493b1cf6d2a1b5 (patch)
tree5f9a9b5c8add37d73d250fcecd6f9669eb81c9cf /poppler/FileSpec.cc
parent1881486e9817304d0817ce24b177c1bc79587138 (diff)
Return NULL EmbFile if the FileSpec is not ok
Otherwise we might end up asserting
Diffstat (limited to 'poppler/FileSpec.cc')
-rw-r--r--poppler/FileSpec.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/poppler/FileSpec.cc b/poppler/FileSpec.cc
index 13606089..1adcf5b9 100644
--- a/poppler/FileSpec.cc
+++ b/poppler/FileSpec.cc
@@ -7,6 +7,7 @@
//
// Copyright (C) 2008-2009 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+// Copyright (C) 2012 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -151,6 +152,9 @@ FileSpec::~FileSpec()
EmbFile *FileSpec::getEmbeddedFile()
{
+ if(!ok)
+ return NULL;
+
if (embFile)
return embFile;