Browse Source

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

Jonas Jenwald 11 years ago
parent
commit
c68ffcf978
  1. 2
      src/core/obj.js

2
src/core/obj.js

@ -419,7 +419,7 @@ var Catalog = (function CatalogClosure() {
var xref = this.xref; var xref = this.xref;
var dests = {}, nameTreeRef, nameDictionaryRef; var dests = {}, nameTreeRef, nameDictionaryRef;
var obj = this.catDict.get('Names'); var obj = this.catDict.get('Names');
if (obj) { if (obj && obj.has('Dests')) {
nameTreeRef = obj.getRaw('Dests'); nameTreeRef = obj.getRaw('Dests');
} else if (this.catDict.has('Dests')) { } else if (this.catDict.has('Dests')) {
nameDictionaryRef = this.catDict.get('Dests'); nameDictionaryRef = this.catDict.get('Dests');

Loading…
Cancel
Save