diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-09-15 14:57:00 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-09-15 14:57:00 +0800 |
commit | 9fff8d12468458dc467d5f67ff7cd3bd5372df41 (patch) | |
tree | b9be9cb6989e0604d95e2f6298c588504f985411 /widgets/misc | |
parent | 25d7fddd4ef5c143cf1746922ec331f3b2948954 (diff) | |
download | gsoc2013-evolution-9fff8d12468458dc467d5f67ff7cd3bd5372df41.tar.gz gsoc2013-evolution-9fff8d12468458dc467d5f67ff7cd3bd5372df41.tar.zst gsoc2013-evolution-9fff8d12468458dc467d5f67ff7cd3bd5372df41.zip |
Check that unsorted >= 0 before using it as an array index. (Bug #9115)
2001-09-15 Jon Trowbridge <trow@ximian.com>
* gal/widgets/e-reflow.c (e_reflow_reflow): Check that
unsorted >= 0 before using it as an array index. (Bug #9115)
svn path=/trunk/; revision=12852
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/e-reflow.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index ad414fd65e..bbb29b88e8 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -1102,11 +1102,12 @@ e_reflow_reflow( GnomeCanvasItem *item, int flags ) next_column ++; } - if (reflow->items[unsorted]) + if (unsorted >= 0 && reflow->items[unsorted]) { e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(reflow->items[unsorted]), (double) running_width, (double) running_height); - running_height += reflow->heights[unsorted] + E_REFLOW_BORDER_WIDTH; + running_height += reflow->heights[unsorted] + E_REFLOW_BORDER_WIDTH; + } } reflow->width = running_width + reflow->column_width + E_REFLOW_BORDER_WIDTH; if ( reflow->width < reflow->minimum_width ) |