diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-11 19:30:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-11 19:30:05 +0300 |
commit | 0984b817b1bfed9b8b475f7c79d1627e5037e914 (patch) | |
tree | ed9ba8e7bb29cee25c1efe6fc0442c8d1769b950 /src | |
parent | c83d3a41abcae15b1198b692502bc8b9879a10ab (diff) | |
download | plus-0984b817b1bfed9b8b475f7c79d1627e5037e914.tar.gz plus-0984b817b1bfed9b8b475f7c79d1627e5037e914.tar.bz2 plus-0984b817b1bfed9b8b475f7c79d1627e5037e914.tar.xz plus-0984b817b1bfed9b8b475f7c79d1627e5037e914.zip |
Fix chat room properties if two time join and part chat room.
Diffstat (limited to 'src')
-rw-r--r-- | src/resources/chatobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/chatobject.cpp b/src/resources/chatobject.cpp index a3582e3d6..0c617f6dc 100644 --- a/src/resources/chatobject.cpp +++ b/src/resources/chatobject.cpp @@ -38,10 +38,10 @@ ChatObject::ChatObject() : ChatObject::~ChatObject() { std::map<std::string, ChatObject*>::iterator it = chatNameMap.find(title); - if (it != chatNameMap.end()) + if (it != chatNameMap.end() && (*it).second == this) chatNameMap.erase(it); std::map<int, ChatObject*>::iterator it2 = chatIdMap.find(chatId); - if (it2 != chatIdMap.end()) + if (it2 != chatIdMap.end() && (*it2).second == this) chatIdMap.erase(it2); } |