[egg-list-box/flow-box-enhancements] Avoid a segfault with filtering



commit 568276b9d9d0b70e3de24dc60c8be4b7969d0351
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 22 15:00:31 2013 -0400

    Avoid a segfault with filtering
    
    With filtering, it can happen that more than a lineful of children
    at the end are invisible, and in that case we were running off
    the end of the lines array in egg_flow_box_size_allocate.

 egg-flow-box.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/egg-flow-box.c b/egg-flow-box.c
index 6efbbda..eb58f74 100644
--- a/egg-flow-box.c
+++ b/egg-flow-box.c
@@ -1050,7 +1050,7 @@ egg_flow_box_size_allocate (GtkWidget     *widget,
        */
 
       for (i = 0, iter = g_sequence_get_begin_iter (priv->children);
-           !g_sequence_iter_is_end (iter);
+           !g_sequence_iter_is_end (iter) && i < n_lines;
            i++)
         {
           iter = get_largest_size_for_line_in_opposing_orientation (box,


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