[evolution-patches] 43199: Crash in text cell pango call



This patch avoids calling any more pango code if width <= 0.

Mike
Index: gal/e-table/e-cell-text.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-cell-text.c,v
retrieving revision 1.127
diff -u -p -r1.127 e-cell-text.c
--- gal/e-table/e-cell-text.c	16 May 2003 21:58:32 -0000	1.127
+++ gal/e-table/e-cell-text.c	19 May 2003 18:05:04 -0000
@@ -473,11 +473,10 @@ build_layout (ECellTextView *text_view, 
 		pango_attr_list_unref (attrs);
 	}
 
-	if (text_view->edit)
+	if (text_view->edit || width <= 0)
 		return layout;
 
-	if (width > 0)
-		pango_layout_set_width (layout, width * PANGO_SCALE);
+	pango_layout_set_width (layout, width * PANGO_SCALE);
 	pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
 
 	if (pango_layout_get_line_count (layout) > 1) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]