summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 872afe05e..22db67357 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -698,7 +698,10 @@ void ChatHandler::processChatRoomJoinAck(Net::MessageIn &msg)
ChatObject *oldChat = ChatObject::findById(id);
- PlayerInfo::setRoomName(oldChat->title);
+ if (oldChat)
+ PlayerInfo::setRoomName(oldChat->title);
+ else
+ PlayerInfo::setRoomName(std::string());
chatWindow->joinRoom(true);
ChatObject *const obj = new ChatObject;
if (oldChat)