Browse Source

Fixed menu items not freeing correctly. Fixes #34

woollybah 6 năm trước cách đây
mục cha
commit
60aa911d2b
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  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