diff options
author | Silenio Quarti <silenio> | 2006-03-23 20:38:26 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2006-03-23 20:38:26 +0000 |
commit | b4c8aae1f3bd9de3bb7cb0d1ec31a548dc3c52c5 (patch) | |
tree | 9db36d009ec616eaae97b7d0f1920e6891dbc825 | |
parent | afa9488e447f4b534748ef1ce336e6d76535daa5 (diff) | |
download | eclipse.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-x | bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java | 12 |
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 (); |