Return ErrorFont in loadFont when the fontRef is undefined

This commit is contained in:
Jonas Jenwald 2014-06-12 12:46:39 +02:00
parent da42fce118
commit c0250e16e3

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);
}