[evince/gnome-3-24] view: Fix infinite loop over annotation windows



commit 6171759fbc6a980d486b7415e8b059449c6db619
Author: Jose Aliste <jaliste src gnome org>
Date:   Tue Aug 8 20:48:00 2017 -0500

    view: Fix infinite loop over annotation windows
    
    When fixing bug 760299, we introduced an infinite loop
    that is triggered (sometimes) when removing annotations.
    This patch fixes that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785975

 libview/ev-view.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 9012171..9560249 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -3017,9 +3017,10 @@ ev_view_remove_window_child_for_annot (EvView       *view,
 
                child = (EvViewWindowChild *)children->data;
 
-               if (child->page != page)
+               if (child->page != page) {
+                       children = children->next;
                        continue;
-
+               }
                wannot = ev_annotation_window_get_annotation (EV_ANNOTATION_WINDOW (child->window));
                if (ev_annotation_equal (wannot, annot)) {
                        gtk_widget_destroy (child->window);


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