summaryrefslogtreecommitdiff
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:54 +0200
commit3ca67a59fc15782abb1e479eb2b8916de5b1b6ed (patch)
treeea0da545535c059dc609891d9a9efe86629fb619
parent686ec0cc92e25f74eaa9e09a328724cbdf939bca (diff)
Return NULL EmbFile if the FileSpec is not ok
Otherwise we might end up asserting
-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;