mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix critical error when Gnucash closes with report pages open
Prior to Gtk version 3.20, when using gtk_container_remove the removed widget was required to be the direct child of the container.
This commit is contained in:
parent
e41410ef25
commit
bbd29b69c6
@ -245,8 +245,15 @@ gnc_html_webkit_dispose( GObject* obj )
|
||||
|
||||
if ( priv->web_view != NULL )
|
||||
{
|
||||
// In Gtk Version 3.20 they relaxed the fact that the widget should be a
|
||||
// direct child of the container otherwise it would be a critical error
|
||||
#if GTK_CHECK_VERSION(3,20,0)
|
||||
gtk_container_remove( GTK_CONTAINER(priv->base.container),
|
||||
GTK_WIDGET(priv->web_view) );
|
||||
#else
|
||||
GtkWidget *parent = gtk_widget_get_parent(GTK_WIDGET(priv->web_view));
|
||||
gtk_container_remove( GTK_CONTAINER(priv->base.container), parent);
|
||||
#endif
|
||||
priv->web_view = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user