diff options
author | Niraj Modi | 2019-07-08 05:51:56 +0000 |
---|---|---|
committer | Niraj Modi | 2019-07-08 05:51:56 +0000 |
commit | 68da4318d8869a0a7957ca4663aefb7954a6a578 (patch) | |
tree | 50cf51ddf2a9f57f2d3334d4ae3aa63ead2094b7 | |
parent | b2cca20502c199da8b6bb91901b1d1feef8131c4 (diff) | |
download | eclipse.platform.swt-68da4318d8869a0a7957ca4663aefb7954a6a578.tar.gz eclipse.platform.swt-68da4318d8869a0a7957ca4663aefb7954a6a578.tar.xz eclipse.platform.swt-68da4318d8869a0a7957ca4663aefb7954a6a578.zip |
Bug 127975 - [Win32] Exception thrown when disposing caret
Change-Id: I77e7f0c249174ca301fa638c2d0f5c8d527dcbad
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java index 4d5fde534d..bc0f470331 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -323,7 +323,10 @@ void resizeIME () { @Override void releaseParent () { super.releaseParent (); - if (this == parent.getCaret ()) parent.setCaret (null); + if (parent != null && this == parent.caret) { + if (!parent.isDisposed()) parent.setCaret (null); + else parent.caret = null; + } } @Override |