From ed13004c60129272797415da45cade65bdc859bc Mon Sep 17 00:00:00 2001 From: Mengjie Yu Date: Fri, 29 Apr 2005 08:09:55 +0000 Subject: we should not do any layout adjustment if the item doesn't exist. 2005-04-28 Mengjie Yu * gal/widgets/e-reflow.c: (do_adjustment): we should not do any layout adjustment if the item doesn't exist. Fixes #302275 svn path=/trunk/; revision=29248 --- widgets/misc/e-reflow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'widgets') diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index b4d5d03025..4c48505c38 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -168,8 +168,11 @@ do_adjustment (gpointer user_data) gfloat value, min_value, max_value; EReflow *reflow = user_data; - adj = gtk_layout_get_hadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (reflow)->canvas)); row = reflow->cursor_row; + if (row == -1) + return FALSE; + + adj = gtk_layout_get_hadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (reflow)->canvas)); value = adj->value; min_value = reflow->items[row]->x2 - adj->page_size; -- cgit v1.2.3