Avoid runtime warning
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 21 Nov 2008 09:08:39 +0000 (18:08 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 21 Nov 2008 09:08:39 +0000 (18:08 +0900)
lib/gtksheet/gtksheet.c

index aefffe2d9853403008e35aa9e9c41350d8b653e3..0fdc61cf85e49f9634f81b562c61a7cbd6051d03 100644 (file)
@@ -119,7 +119,8 @@ default_row_height (const GtkSheet *sheet)
 {
   GtkWidget *widget = GTK_WIDGET (sheet);
 
-  if (!widget->style->font_desc) return 25;
+  if (! GTK_WIDGET_REALIZED (widget) || !widget->style->font_desc)
+    return 25;
   else
     {
       PangoContext *context = gtk_widget_get_pango_context (widget);