Check if the Names dictionary actually contains a Dests dictionary before attempting to get the destinations

This commit is contained in:
Jonas Jenwald 2014-05-14 12:43:20 +02:00
parent 3051667397
commit c68ffcf978

View File

@ -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');