Don't throw when rendering before atlas is set

This fixes a problem when loading the webgl addon before the terminal
is attached.

See microsoft/vscode#85048
This commit is contained in:
Daniel Imms
2019-11-24 09:22:07 -08:00
parent c0da45113f
commit 53fb1ba54d
@@ -184,7 +184,7 @@ export class GlyphRenderer {
let rasterizedGlyph: IRasterizedGlyph; let rasterizedGlyph: IRasterizedGlyph;
if (!this._atlas) { if (!this._atlas) {
throw new Error('atlas must be set before updating cell'); return;
} }
if (chars && chars.length > 1) { if (chars && chars.length > 1) {
rasterizedGlyph = this._atlas.getRasterizedGlyphCombinedChar(chars, bg, fg); rasterizedGlyph = this._atlas.getRasterizedGlyphCombinedChar(chars, bg, fg);