Fixed #64 (crash on exit)

This commit is contained in:
Matthias Koefferlein 2018-01-14 00:15:16 +01:00
parent a2ba300bd7
commit 8b479bd20a
1 changed files with 4 additions and 0 deletions

View File

@ -145,6 +145,10 @@ LayoutHandle::rename (const std::string &name, bool force) throw (tl::Exception)
tl::info << "Renamed layout from " << m_name << " to " << n;
}
if (find (m_name) == this) {
ms_dict.erase (m_name);
}
m_name = n;
ms_dict.insert (std::make_pair (n, this));
return;