Fixed segfault at (auto)save time.
This commit is contained in:
parent
61c5c00388
commit
15be48373c
1 changed files with 2 additions and 1 deletions
|
@ -452,11 +452,12 @@ void config::splice_children(config &src, const std::string &key)
|
|||
src.ordered_children.end());
|
||||
|
||||
child_list &dst = children[key];
|
||||
child_map::iterator i_dst = children.find(key);
|
||||
unsigned before = dst.size();
|
||||
dst.insert(dst.end(), i_src->second.begin(), i_src->second.end());
|
||||
src.children.erase(i_src);
|
||||
// key might be a reference to i_src->first, so it is no longer usable.
|
||||
|
||||
child_map::iterator i_dst = children.find(key);
|
||||
for (unsigned j = before; j < dst.size(); ++j) {
|
||||
ordered_children.push_back(child_pos(i_dst, j));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue