From c68ffcf9785db3b4f0cfb196384622f376892b31 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 14 May 2014 12:43:20 +0200 Subject: [PATCH] Check if the Names dictionary actually contains a Dests dictionary before attempting to get the destinations --- src/core/obj.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/obj.js b/src/core/obj.js index 8d6145235..9c2c77ffd 100644 --- a/src/core/obj.js +++ b/src/core/obj.js @@ -419,7 +419,7 @@ var Catalog = (function CatalogClosure() { var xref = this.xref; var dests = {}, nameTreeRef, nameDictionaryRef; var obj = this.catDict.get('Names'); - if (obj) { + if (obj && obj.has('Dests')) { nameTreeRef = obj.getRaw('Dests'); } else if (this.catDict.has('Dests')) { nameDictionaryRef = this.catDict.get('Dests');