From 9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Mon, 31 Dec 2018 11:47:57 +0100
Subject: [PATCH] PDFDoc::setup: Fix return value

At that point xref can have gone wrong since extractPDFSubtype() can
have caused a reconstruct that broke stuff so instead of unconditionally
returning true, return xref->isOk()

Fixes #706
---
 poppler/PDFDoc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 351bd2ea..9213f567 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -312,6 +312,6 @@ bool PDFDoc::setup(const GooString *ownerPassword, const GooString *userPassword
 
   // done
-  return gTrue;
+  return xref->isOk();
 }
 
 PDFDoc::~PDFDoc() {
-- 
2.21.0
