summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2006-03-27 17:02:24 +0000
committerVeronika Irvine <veronika>2006-03-27 17:02:24 +0000
commit98755812d927bfcbfc2a2439ae960f612d0da37e (patch)
tree8075ec7fc4e525b8930d4461a5114d901274d0cc
parente7a7f994afd09083232e2396e0a908d2d2cda726 (diff)
downloadeclipse.platform.swt-98755812d927bfcbfc2a2439ae960f612d0da37e.tar.gz
eclipse.platform.swt-98755812d927bfcbfc2a2439ae960f612d0da37e.tar.xz
eclipse.platform.swt-98755812d927bfcbfc2a2439ae960f612d0da37e.zip
Bug133276 - NPE in refresh if control disposed in event handler
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
index 98805dd9a0..6325fc743f 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
@@ -541,10 +541,12 @@ int Release() {
}
void refresh() {
+ if (control == null || control.isDisposed()) return;
+ int handle = control.handle;
RECT lpRect = new RECT();
- if (OS.GetUpdateRect(control.handle, lpRect, false)) {
+ if (OS.GetUpdateRect(handle, lpRect, false)) {
OS.ImageList_DragShowNolock(false);
- OS.RedrawWindow(control.handle, lpRect, 0, OS.RDW_UPDATENOW | OS.RDW_INVALIDATE);
+ OS.RedrawWindow(handle, lpRect, 0, OS.RDW_UPDATENOW | OS.RDW_INVALIDATE);
OS.ImageList_DragShowNolock(true);
}
}