Merge pull request #4922 from Snuffleupagus/undefined-fontRef

Return ErrorFont in loadFont when the fontRef is undefined
This commit is contained in:
Yury Delendik 2014-06-12 12:58:45 -05:00
commit 75859b8d89

View File

@ -469,6 +469,11 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
return errorFont();
}
}
if (!fontRef) {
warn('fontRef not available');
return errorFont();
}
if (this.fontCache.has(fontRef)) {
return this.fontCache.get(fontRef);
}