From a99b6902c1195a795a3c06cd7f50bbc6ae6b2175 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 7 Jul 2012 07:14:53 +0200 Subject: [PATCH 08/11] PsppSheetView resize handler: Do nothing if the widget is not realized This seems to avoid the occasional GtkCritical that I get. --- src/ui/gui/pspp-sheet-view.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/ui/gui/pspp-sheet-view.c b/src/ui/gui/pspp-sheet-view.c index 51ceafc..0282548 100644 --- a/src/ui/gui/pspp-sheet-view.c +++ b/src/ui/gui/pspp-sheet-view.c @@ -5361,6 +5361,9 @@ do_presize_handler (PsppSheetView *tree_view) validate_visible_area (tree_view); tree_view->priv->presize_handler_timer = 0; + if (! gtk_widget_get_realized (GTK_WIDGET (tree_view))) + return FALSE; + gtk_widget_size_request (GTK_WIDGET (tree_view), &requisition); tree_view->priv->hadjustment->upper = MAX (tree_view->priv->hadjustment->upper, (gfloat)requisition.width); -- 1.7.2.5