Fix editor's selection extractor clean up

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

Branch: refs/heads/swellrt
Commit: 9a8d094d6e7c45aed482a4191f3ddf50dda459f2
Parents: 4376f6f
Author: Pablo Ojanguren <[email protected]>
Authored: Thu Sep 8 17:09:24 2016 +0200
Committer: Pablo Ojanguren <[email protected]>
Committed: Thu Sep 8 17:09:24 2016 +0200

----------------------------------------------------------------------
 wave/src/main/java/org/swellrt/client/editor/TextEditor.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/9a8d094d/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 1943eeb..4355a4d 100644
--- a/wave/src/main/java/org/swellrt/client/editor/TextEditor.java
+++ b/wave/src/main/java/org/swellrt/client/editor/TextEditor.java
@@ -497,8 +497,10 @@ public class TextEditor implements EditorUpdateListener {
 
   public void cleanUp() {
     if (editor != null) {
-      if (selectionExtractor != null)
-        selectionExtractor.start(editor);
+      if (selectionExtractor != null) {
+        selectionExtractor.stop(editor);
+        selectionExtractor = null;
+      }
       editor.removeUpdateListener(this);
       editor.removeContentAndUnrender();
       editor.reset();

Reply via email to