Skip to content

Commit 540a1d7

Browse files
committed
[GTK] Do not try to remove fixedHandle if there is none
GtkWidgets can act as containers thus SwtFixed don't have to used always.
1 parent 5c10a87 commit 540a1d7

File tree

1 file changed

+6
-4
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets

1 file changed

+6
-4
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4829,11 +4829,13 @@ void destroyWidget() {
48294829
// Remove widget from hierarchy by removing it from parent container
48304830
if (parent != null) {
48314831
long currHandle = topHandle();
4832-
if(GTK.GTK_IS_WINDOW(currHandle)) {
4832+
4833+
if (GTK.GTK_IS_WINDOW(currHandle)) {
48334834
GTK4.gtk_window_destroy(currHandle);
4834-
}
4835-
else {
4836-
OS.swt_fixed_remove(parent.parentingHandle(), fixedHandle);
4835+
} else {
4836+
if (fixedHandle != 0) {
4837+
OS.swt_fixed_remove(parent.parentingHandle(), fixedHandle);
4838+
}
48374839
}
48384840
}
48394841
releaseHandle();

0 commit comments

Comments
 (0)