Protection from empty/invalid root or kid in NameTree

This commit is contained in:
Yury Delendik 2013-03-19 08:36:12 -05:00
parent 9ec9754eba
commit 6809f254eb

View File

@ -797,6 +797,9 @@ var NameTree = (function NameTreeClosure() {
while (queue.length > 0) {
var i, n;
var obj = xref.fetchIfRef(queue.shift());
if (!isDict(obj)) {
continue;
}
if (obj.has('Kids')) {
var kids = obj.get('Kids');
for (i = 0, n = kids.length; i < n; i++) {