Skip to content

Commit 6051720

Browse files
committed
Merge pull request mozilla#1335 from mrqzzz/master
Re-Fixed code (Lint friendly)
2 parents f63db6d + 7ec282c commit 6051720

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/obj.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ var Catalog = (function CatalogClosure() {
134134
while (queue.length > 0) {
135135
var i = queue.shift();
136136
var outlineDict = xref.fetch(i.obj);
137+
if (outlineDict === null)
138+
continue;
137139
if (!outlineDict.has('Title'))
138140
error('Invalid outline item');
139141
var dest = outlineDict.get('A');
@@ -569,6 +571,8 @@ var XRef = (function XRefClosure() {
569571
},
570572
getEntry: function xRefGetEntry(i) {
571573
var e = this.entries[i];
574+
if (e === null)
575+
return null;
572576
return e.free ? null : e; // returns null is the entry is free
573577
},
574578
fetchIfRef: function xRefFetchIfRef(obj) {

0 commit comments

Comments
 (0)