From 53cc3c86f2b5040cec577145feff9db2c93bd268 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 May 2015 02:48:54 +0300 Subject: Fix some issues after automatic checks. --- src/net/eathena/chathandler.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/net/eathena/chathandler.cpp') diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 07ed7e390..872afe05e 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -697,19 +697,20 @@ void ChatHandler::processChatRoomJoinAck(Net::MessageIn &msg) } ChatObject *oldChat = ChatObject::findById(id); - if (!oldChat) - oldChat = new ChatObject; PlayerInfo::setRoomName(oldChat->title); chatWindow->joinRoom(true); ChatObject *const obj = new ChatObject; - obj->ownerId = oldChat->ownerId; - obj->chatId = oldChat->chatId; - obj->maxUsers = oldChat->maxUsers; - obj->currentUsers = oldChat->currentUsers; - obj->type = oldChat->type; - obj->title = oldChat->title; -// obj->update(); + if (oldChat) + { + obj->ownerId = oldChat->ownerId; + obj->chatId = oldChat->chatId; + obj->maxUsers = oldChat->maxUsers; + obj->currentUsers = oldChat->currentUsers; + obj->type = oldChat->type; + obj->title = oldChat->title; +// obj->update(); + } localPlayer->setChat(obj); } -- cgit v1.2.3-60-g2f50