Browse Source

Fixed menu items not freeing correctly. Fixes #34

woollybah 6 years ago
parent
commit
60aa911d2b
1 changed files with 4 additions and 3 deletions
  1. 4 3
      gtk3maxgui.mod/gtkgadget.bmx

+ 4 - 3
gtk3maxgui.mod/gtkgadget.bmx

@@ -1386,12 +1386,13 @@ Type TGTKMenuItem Extends TGTKGadget
 	End Method
 	
 	Method free:Int() Override
+		Local _handle:Byte Ptr = handle
+
 		Super.Free()
 
-		If handle
-			gtk_widget_destroy(handle)
+		If _handle
+			gtk_widget_destroy(_handle)
 		End If
-		handle = Null
 		menu = Null
 
 		If pixmap Then