[pan] fix missing articles with dangling reference



commit 2478eb63fe2603ef4cdf4f712c48ec4c559cedfa
Author: Dominique Dumont <dod debian org>
Date:   Sun Dec 26 17:52:15 2021 +0100

    fix missing articles with dangling reference
    
    Closes #58
    
    Patch coming from
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568332
    
    Many thanks to  Lionel √Člie Mamane for the help

 pan/data-impl/my-tree.cc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/pan/data-impl/my-tree.cc b/pan/data-impl/my-tree.cc
index f4bc48f..e64b105 100644
--- a/pan/data-impl/my-tree.cc
+++ b/pan/data-impl/my-tree.cc
@@ -316,10 +316,11 @@ DataImpl :: MyTree :: apply_filter (const const_nodes_v& candidates)
   //  maybe include threads or subthreads...
   if (_show_type == Data::SHOW_THREADS)
   {
-    foreach (const_nodes_v, pass, it) {
-      const ArticleNode *& n (*it);
-      while (n->_parent)
-        n = n->_parent;
+    const_nodes_v passcopy=pass;
+    foreach (const_nodes_v, passcopy, it) {
+      const ArticleNode *n (*it);
+      while ((n = n->_parent))
+        pass.push_back(n);
     }
     std::sort (pass.begin(), pass.end(), compare);
     pass.erase (std::unique (pass.begin(), pass.end()), pass.end());


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