GTK(CRITICAL):IA_gtk_widget_destroy:assertion 'GTK_IS_WIDGET
Posted: Wed Jan 15, 2014 6:37 pm
Hi,
I have a question. Why is it, that the following code under Linux causes the warning shown below the code?
The warning is: GTK(CRITICAL):IA_gtk_widget_destroy:assertion 'GTK_IS_WIDGET(widget)' failed
I would have expected, that either it is a valid menu, then it can be freed or it is not, then the line with FreeMenu is never executed. In both cases there shouldn't be a warning.
Where am I wrong?
Thanks for any light on this.
gerd
BTW the same code is running under Windows without any problem.
I have a question. Why is it, that the following code under Linux causes the warning shown below the code?
Code: Select all
ForEach MenuList()
If MenuList()\type = #Type_Menu
If IsMenu(MenuList()\id)
FreeMenu(MenuList()\id) ; < This line is marked as causing the warning
EndIf
EndIf
Next
I would have expected, that either it is a valid menu, then it can be freed or it is not, then the line with FreeMenu is never executed. In both cases there shouldn't be a warning.
Where am I wrong?
Thanks for any light on this.
gerd
BTW the same code is running under Windows without any problem.