3587f3
From de0c0b8324e776f0b851485e0fc9622fc35695b7 Mon Sep 17 00:00:00 2001
3587f3
From: Albert Astals Cid <aacid@kde.org>
3587f3
Date: Sat, 29 Dec 2018 01:25:17 +0100
3587f3
Subject: [PATCH] FileSpec: Move the fileSpec.dictLookup call inside
3587f3
 fileSpec.isDict if
3587f3
3587f3
Fixes #704
3587f3
---
3587f3
 poppler/FileSpec.cc | 9 +++++----
3587f3
 1 file changed, 5 insertions(+), 4 deletions(-)
3587f3
3587f3
diff --git a/poppler/FileSpec.cc b/poppler/FileSpec.cc
3587f3
index 8a8b9e7e..7c12da63 100644
3587f3
--- a/poppler/FileSpec.cc
3587f3
+++ b/poppler/FileSpec.cc
3587f3
@@ -133,11 +133,12 @@ FileSpec::FileSpec(const Object *fileSpecA)
3587f3
         return;
3587f3
       }
3587f3
     }
3587f3
-  }
3587f3
 
3587f3
-  obj1 = fileSpec.dictLookup("Desc");
3587f3
-  if (obj1.isString())
3587f3
-    desc = obj1.getString()->copy();
3587f3
+    obj1 = fileSpec.dictLookup("Desc");
3587f3
+    if (obj1.isString()) {
3587f3
+      desc = obj1.getString()->copy();
3587f3
+    }
3587f3
+  }
3587f3
 }
3587f3
 
3587f3
 FileSpec::~FileSpec()
3587f3
-- 
3587f3
2.20.1
3587f3