Skip to content
Snippets Groups Projects
Commit 33a24ec4 authored by g0dil's avatar g0dil
Browse files

Utils/Console: Reset GenericNode::parent_ when destroying parent

parent c116d7d3
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,14 @@ prefix_ void senf::console::LinkNode::v_help(std::ostream & os)
///////////////////////////////////////////////////////////////////////////
//senf::console::DirectoryNode
prefix_ senf::console::DirectoryNode::~DirectoryNode()
{
ChildMap::iterator i (children_.begin());
ChildMap::iterator const i_end (children_.end());
for (; i != i_end; ++i)
i->second->parent_ = 0;
}
prefix_ senf::console::GenericNode::ptr
senf::console::DirectoryNode::remove(std::string const & name)
{
......
......@@ -436,6 +436,7 @@ namespace console {
static ptr create(); ///< Create node object.
/**< You should normally use either mkdir() or
ScopedDirectory instead of create() */
~DirectoryNode();
///\}
///////////////////////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment