From a74d90c5dd6dcbc257ceebf870506b442851c91e Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 7 Jul 2012 07:14:53 +0200 Subject: [PATCH] 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 file changed, 3 insertions(+) diff --git a/src/ui/gui/pspp-sheet-view.c b/src/ui/gui/pspp-sheet-view.c index 51ceafcc6f..02825483cc 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); -- 2.30.2