File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -4825,18 +4825,19 @@ void releaseWidget () {
48254825@ Override
48264826void destroyWidget () {
48274827 if (GTK .GTK4 ) {
4828- // Remove widget from hierarchy by removing it from parent container
4829- if (parent != null ) {
4830- long currHandle = topHandle ();
4831-
4832- if (GTK .GTK_IS_WINDOW (currHandle )) {
4833- GTK4 .gtk_window_destroy (currHandle );
4834- } else {
4835- if (fixedHandle != 0 ) {
4836- OS .swt_fixed_remove (parent .parentingHandle (), fixedHandle );
4837- }
4828+ long currHandle = topHandle ();
4829+ if (GTK .GTK_IS_WINDOW (currHandle )) {
4830+ // GTK windows don't have a parent, so destroy it now
4831+ GTK4 .gtk_window_destroy (currHandle );
4832+ } else if (parent != null ) {
4833+ if (fixedHandle != 0 ) {
4834+ // Remove widget from hierarchy by removing it from parent container
4835+ OS .swt_fixed_remove (parent .parentingHandle (), fixedHandle );
48384836 }
4837+ } else {
4838+ assert false : "widgets must have a parent or be a GtkWindow" ;
48394839 }
4840+
48404841 releaseHandle ();
48414842 } else {
48424843 super .destroyWidget ();
You can’t perform that action at this time.
0 commit comments