Skip to content

Commit

Permalink
Merge pull request Mudlet#245 from SlySven/fix_clearAreaNamesMapAtSta…
Browse files Browse the repository at this point in the history
…rtOfReloading

Fix: Empty TRoomDB::areaNamesMap before (re)loading it from file
  • Loading branch information
SlySven committed Jan 22, 2015
2 parents be9bcff + 20cbc9c commit 5285831
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/TRoomDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ void TRoomDB::restoreAreaMap( QDataStream & ifs )
{
QMap<int, QString> areaNamesMapWithPossibleEmptyOrDuplicateItems;
ifs >> areaNamesMapWithPossibleEmptyOrDuplicateItems;
areaNamesMap.clear(); // Following code assumes areaNamesMap is empty but
// under some situations this has not been the case...

// Validate names: name nameless areas and rename duplicates
QMultiMap<QString, QString> renamedMap; // For warning message, holds renamed area map
Expand Down

0 comments on commit 5285831

Please sign in to comment.