evolution 2.28.4 segfaults in eti_row_height_real: check some variables

From: Thomas Mittelstaedt <tmstaedt@t-mittelstaedt.de>


---

 widgets/table/e-table-item.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index d009774..22d415b 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -610,10 +610,11 @@ eti_remove_header_model (ETableItem *eti)
 static gint
 eti_row_height_real (ETableItem *eti, gint row)
 {
-	const gint cols = e_table_header_count (eti->header);
+	gint cols = 0; 
 	gint col;
 	gint h, max_h;
 
+	cols = e_table_header_count (eti->header);
 	g_return_val_if_fail (cols == 0 || eti->cell_views, 0);
 
 	max_h = 0;
@@ -704,6 +705,8 @@ eti_row_height (ETableItem *eti, gint row)
 	} else {
 		if (!eti->height_cache) {
 			calculate_height_cache (eti);
+			if (!eti->height_cache)
+				return 0;
 		}
 		if (eti->height_cache[row] == -1) {
 			eti->height_cache[row] = eti_row_height_real(eti, row);
@@ -715,7 +718,7 @@ eti_row_height (ETableItem *eti, gint row)
 				e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(eti));
 			}
 		}
-		return eti->height_cache[row];
+		return eti->height_cache ? eti->height_cache[row] : 0;
 	}
 }
 
