From 626e22e4aec924446b48813b054732a029a60597 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 7 Jan 2014 18:45:18 -0700 Subject: [PATCH] Avoid exceptions when a live editor is compared with a destroyed one --- src/editor.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor.coffee b/src/editor.coffee index cff06ddfc..c144aa10d 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -174,7 +174,8 @@ class Editor extends Model # Returns a {Boolean}. isEqual: (other) -> return false unless other instanceof Editor - @buffer.getPath() == other.buffer.getPath() and + @isAlive() == other.isAlive() and + @buffer.getPath() == other.buffer.getPath() and @getScrollTop() == other.getScrollTop() and @getScrollLeft() == other.getScrollLeft() and @getCursorScreenPosition().isEqual(other.getCursorScreenPosition())