summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-17 02:48:54 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-17 02:48:54 +0300
commit53cc3c86f2b5040cec577145feff9db2c93bd268 (patch)
tree44d3d91d85d9c10fbb8aa5636b0e72ebfea0c76f /src/net
parent26f2c689298bb2077000b81ff3fe14328a89feb8 (diff)
downloadplus-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.gz
plus-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.bz2
plus-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.xz
plus-53cc3c86f2b5040cec577145feff9db2c93bd268.zip
Fix some issues after automatic checks.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/chathandler.cpp19
1 files changed, 10 insertions, 9 deletions
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);
}