Allow safe duplicated editor cleanups

Project: http://git-wip-us.apache.org/repos/asf/incubator-wave/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-wave/commit/481fe1fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-wave/tree/481fe1fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-wave/diff/481fe1fa

Branch: refs/heads/swellrt
Commit: 481fe1faccbf83ee6727629cd742eea7e1c44836
Parents: 9a8d094
Author: Pablo Ojanguren <[email protected]>
Authored: Thu Sep 8 17:27:30 2016 +0200
Committer: Pablo Ojanguren <[email protected]>
Committed: Thu Sep 8 17:27:30 2016 +0200

----------------------------------------------------------------------
 wave/src/main/java/org/swellrt/client/editor/TextEditor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/481fe1fa/wave/src/main/java/org/swellrt/client/editor/TextEditor.java
----------------------------------------------------------------------
diff --git a/wave/src/main/java/org/swellrt/client/editor/TextEditor.java 
b/wave/src/main/java/org/swellrt/client/editor/TextEditor.java
index 4355a4d..a49f32c 100644
--- a/wave/src/main/java/org/swellrt/client/editor/TextEditor.java
+++ b/wave/src/main/java/org/swellrt/client/editor/TextEditor.java
@@ -496,7 +496,7 @@ public class TextEditor implements EditorUpdateListener {
   }
 
   public void cleanUp() {
-    if (editor != null) {
+    if (editor != null && doc != null) {
       if (selectionExtractor != null) {
         selectionExtractor.stop(editor);
         selectionExtractor = null;

Reply via email to