Re: IA__gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
I think you should use instead: #define NEW_GTK_DESTROY(WIDGET) if (GTK_IS_WIDGET(WIDGET)) \ ... On 03/12/2015 04:20 PM, Rui Pedro Caldeira wrote: Hello guys, I once again seek your guidance. I have a series of GtkWidget* that then take the form of GtkButton, GtkComboBoxText,... And when I close a window, I first want to destroy the widgets. So I use the following macro: #define NEW_GTK_DESTROY(WIDGET) if(WIDGET!=NULL) {\ gtk_widget_destroy(GTK_WIDGET(WIDGET));} But I always get this Gtk-CRITICAL **: IA__gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed warning. How can I fix this? Thanks, Rui -- Emmanuel Thomas-Maurin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: IA__gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Le 12/03/2015 16:20, Rui Pedro Caldeira a écrit : Hello guys, I once again seek your guidance. I have a series of GtkWidget* that then take the form of GtkButton, GtkComboBoxText,... And when I close a window, I first want to destroy the widgets. Why? Widgets are automatically destroyed when their parent container is destroyed, and the default action taken when closing a window is to destroy it. This is likely to be the reason why they are already destroyed by the way. Generally you only need to explicitly destroy widgets if you want to change the UI layout dynamically (e.g. if you remove a widget when the user clicks on a button). Regards, Colomban ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
IA__gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
Hello guys, I once again seek your guidance. I have a series of GtkWidget* that then take the form of GtkButton, GtkComboBoxText,... And when I close a window, I first want to destroy the widgets. So I use the following macro: #define NEW_GTK_DESTROY(WIDGET) if(WIDGET!=NULL) {\ gtk_widget_destroy(GTK_WIDGET(WIDGET));} But I always get this Gtk-CRITICAL **: IA__gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed warning. How can I fix this? Thanks, Rui ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list