summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2005-04-29 16:35:19 +0000
committerGrant Gayed <ggayed>2005-04-29 16:35:19 +0000
commit853812d5f821da3282fc30db97d81697ea9ff633 (patch)
tree2abe58081a7ce63be0713b3dedbad99521b19661 /bundles
parenta98644bc0b6dc757301b2cc6d635f4f25fb4039d (diff)
downloadeclipse.platform.swt-853812d5f821da3282fc30db97d81697ea9ff633.tar.gz
eclipse.platform.swt-853812d5f821da3282fc30db97d81697ea9ff633.tar.xz
eclipse.platform.swt-853812d5f821da3282fc30db97d81697ea9ff633.zip
add isDisposed() check to senders of enableWidget
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java1
3 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 4b76d0c1f2..4209bfebc3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -2629,6 +2629,7 @@ public void setEnabled (boolean enabled) {
state |= DISABLED;
}
enableWidget (enabled);
+ if (isDisposed ()) return;
if (enabled) {
if (enableWindow != 0) {
OS.gdk_window_set_user_data (enableWindow, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
index 8b7d13eda6..c1e2227330 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
@@ -159,6 +159,7 @@ void createWidget (int index) {
void enableWidget (boolean enabled) {
super.enableWidget (enabled);
+ if (isDisposed ()) return;
TextStyle linkStyle = new TextStyle (null, enabled ? linkColor : linkDisabledColor, null);
linkStyle.underline = true;
for (int i = 0; i < offsets.length; i++) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index c48407699c..a28f3e6ecd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1103,6 +1103,7 @@ public void setEnabled (boolean enabled) {
state |= DISABLED;
}
enableWidget (enabled);
+ if (isDisposed ()) return;
if (enabled) {
if (enableWindow != 0) {
OS.gdk_window_set_user_data (enableWindow, 0);