From: John Darrington Date: Sat, 7 Jul 2012 05:14:53 +0000 (+0200) Subject: PsppSheetView resize handler: Do nothing if the widget is not realized X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a74d90c5dd6dcbc257ceebf870506b442851c91e;p=pspp PsppSheetView resize handler: Do nothing if the widget is not realized This seems to avoid the occasional GtkCritical that I get. --- 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);