From 0984b817b1bfed9b8b475f7c79d1627e5037e914 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 11 May 2015 19:30:05 +0300 Subject: Fix chat room properties if two time join and part chat room. --- src/resources/chatobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/resources/chatobject.cpp') 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::iterator it = chatNameMap.find(title); - if (it != chatNameMap.end()) + if (it != chatNameMap.end() && (*it).second == this) chatNameMap.erase(it); std::map::iterator it2 = chatIdMap.find(chatId); - if (it2 != chatIdMap.end()) + if (it2 != chatIdMap.end() && (*it2).second == this) chatIdMap.erase(it2); } -- cgit v1.2.3-70-g09d2