summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2006-03-23 20:38:26 +0000
committerSilenio Quarti <silenio>2006-03-23 20:38:26 +0000
commitb4c8aae1f3bd9de3bb7cb0d1ec31a548dc3c52c5 (patch)
tree9db36d009ec616eaae97b7d0f1920e6891dbc825
parentafa9488e447f4b534748ef1ce336e6d76535daa5 (diff)
downloadeclipse.platform.swt-b4c8aae1f3bd9de3bb7cb0d1ec31a548dc3c52c5.tar.gz
eclipse.platform.swt-b4c8aae1f3bd9de3bb7cb0d1ec31a548dc3c52c5.tar.xz
eclipse.platform.swt-b4c8aae1f3bd9de3bb7cb0d1ec31a548dc3c52c5.zip
127821 - ControlExample crash when setting background image on SEPARATOR Label
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java
index 5ee3cce153..db90cd9d87 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java
@@ -406,11 +406,13 @@ void realizeChildren () {
}
void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean allChildren, boolean trim) {
super.redrawWidget (x, y, width, height, redrawAll, allChildren, trim);
- short [] root_x = new short [1], root_y = new short [1];
- OS.XtTranslateCoords (handle, (short) x, (short) y, root_x, root_y);
- short [] label_x = new short [1], label_y = new short [1];
- OS.XtTranslateCoords (formHandle, (short) 0, (short) 0, label_x, label_y);
- redrawHandle (root_x [0] - label_x [0], root_y [0] - label_y [0], width, height, redrawAll, formHandle);
+ if (formHandle != 0) {
+ short [] root_x = new short [1], root_y = new short [1];
+ OS.XtTranslateCoords (handle, (short) x, (short) y, root_x, root_y);
+ short [] label_x = new short [1], label_y = new short [1];
+ OS.XtTranslateCoords (formHandle, (short) 0, (short) 0, label_x, label_y);
+ redrawHandle (root_x [0] - label_x [0], root_y [0] - label_y [0], width, height, redrawAll, formHandle);
+ }
}
void register () {
super.register ();