From 42da082a18bc240541673ea11bc5625d2460e607 Mon Sep 17 00:00:00 2001
From: Max Kahnt <max.kahnt@fu-berlin.de>
Date: Tue, 23 Aug 2016 16:17:22 +0200
Subject: [PATCH] Fix: Set proper leafChild on construction.

The leafChild was not set if the given element was not a leaf
element but its first descendant (in the sense of hbegin) was
a leaf element.
Presumably, this was introduced in 3c65f9abad18fb8c66c3bd83745f79ce89cb10ed
---
 dune/fufem/utilities/hierarchicleafiterator.hh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dune/fufem/utilities/hierarchicleafiterator.hh b/dune/fufem/utilities/hierarchicleafiterator.hh
index 9c013d8d..929bf03c 100644
--- a/dune/fufem/utilities/hierarchicleafiterator.hh
+++ b/dune/fufem/utilities/hierarchicleafiterator.hh
@@ -56,6 +56,8 @@ public:
 
             if (!hIt_->isLeaf())
                 increment();
+            else
+              leafChild_ = *hIt_;
         }
     }
 
-- 
GitLab