Merge pull request #4785 from Tyriar/4757

Fix possible exception when disposing terminal
This commit is contained in:
Daniel Imms
2023-09-10 08:26:22 -07:00
committed by GitHub
+7 -4
View File
@@ -203,11 +203,14 @@ export class RenderService extends Disposable implements IRenderService {
public setRenderer(renderer: IRenderer): void {
this._renderer.value = renderer;
this._renderer.value.onRequestRedraw(e => this.refreshRows(e.start, e.end, true));
// If the value was not set, the terminal is being disposed so ignore it
if (this._renderer.value) {
this._renderer.value.onRequestRedraw(e => this.refreshRows(e.start, e.end, true));
// Force a refresh
this._needsSelectionRefresh = true;
this._fullRefresh();
// Force a refresh
this._needsSelectionRefresh = true;
this._fullRefresh();
}
}
public addRefreshCallback(callback: FrameRequestCallback): number {