Skip to content

Commit 8b42244

Browse files
committed
Close generator before deleting it
1 parent 02ce3ef commit 8b42244

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/xterm-addon-canvas/src/BaseRenderLayer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ export abstract class BaseRenderLayer extends Disposable implements IRenderLayer
386386
// something is wrong with either the lifecycle of _bitmapGenerator or the page canvases are
387387
// swapped out unexpectedly
388388
if (this._bitmapGenerator[glyph.texturePage] && this._charAtlas.pages[glyph.texturePage].canvas !== this._bitmapGenerator[glyph.texturePage]!.canvas) {
389+
this._bitmapGenerator[glyph.texturePage]?.bitmap?.close();
389390
delete this._bitmapGenerator[glyph.texturePage];
390391
}
391392

0 commit comments

Comments
 (0)