From abc29f4648f7c8b3966e38673162e7a6558acf2e Mon Sep 17 00:00:00 2001 From: abe33 Date: Fri, 20 May 2016 15:42:54 +0200 Subject: [PATCH] :bug: Fix error raised when emitting changes and text editor is no longer referenced Fixes #482 --- lib/mixins/decoration-management.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mixins/decoration-management.js b/lib/mixins/decoration-management.js index 41ac2c1f..2cd71e79 100644 --- a/lib/mixins/decoration-management.js +++ b/lib/mixins/decoration-management.js @@ -472,7 +472,7 @@ export default class DecorationManagement extends Mixin { * @access private */ emitDecorationChanges (type, decoration) { - if (this.textEditor.isDestroyed()) { return } + if (!this.textEditor || this.textEditor.isDestroyed()) { return } this.invalidateDecorationForScreenRowsCache()