diff options
Diffstat (limited to 'lib/hier_block.cpp')
-rw-r--r-- | lib/hier_block.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/hier_block.cpp b/lib/hier_block.cpp index 4c0aef3..ab474c5 100644 --- a/lib/hier_block.cpp +++ b/lib/hier_block.cpp @@ -40,8 +40,11 @@ void HierBlock::disconnect(const Element &elem) static Apology::Wax get_ref(const Element &elem) { - boost::shared_ptr<Element> shared_self = elem.weak_self.lock(); - if (shared_self) return shared_self; + if (elem.weak_self) + { + boost::shared_ptr<void> shared_self = elem.weak_self->lock(); + if (shared_self) return shared_self; + } return elem; } |