Skip to content

Commit

Permalink
Merge pull request #2348 from xtermjs/Tyriar-patch-1
Browse files Browse the repository at this point in the history
Fix NPE on dispose when it hasn't been opened
  • Loading branch information
Tyriar committed Jul 25, 2019
2 parents 26948f0 + 3dc5218 commit 689fb6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
this._windowsMode.dispose();
this._windowsMode = undefined;
}
this._renderService.dispose();
if (this._renderService) {
this._renderService.dispose();
}
this._customKeyEventHandler = null;
this.write = () => {};
if (this.element && this.element.parentNode) {
Expand Down

0 comments on commit 689fb6b

Please sign in to comment.