Avoid critical when renewing dataset
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 21 Nov 2008 10:15:35 +0000 (19:15 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 21 Nov 2008 10:15:35 +0000 (19:15 +0900)
lib/gtksheet/gtksheet.c

index 3743fe9bd4a14ff3d57fbd4e57a73fe493b16488..ad6d6165f8229df084dc00fa3434e4ac0e774a43 100644 (file)
@@ -1218,6 +1218,9 @@ range_update_callback (GSheetModel *m, gint row0, gint col0,
   range.rowi = rowi;
   range.coli = coli;
 
+  if ( !GTK_WIDGET_REALIZED (GTK_WIDGET (sheet)))
+    return;
+
   if ( max_visible_row (sheet) > g_sheet_model_get_row_count (sheet->model)
        ||
        max_visible_column (sheet) > g_sheet_model_get_column_count (sheet->model))