summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index ce2b3a581..8d986797b 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -2079,9 +2079,12 @@ void BeingRecv::processSkillCancel(Net::MessageIn &msg)
void BeingRecv::processSolveCharName(Net::MessageIn &msg)
{
const int id = msg.readInt32("char id");
- const std::string name = msg.readString(24, "name");
- if (actorManager != nullptr)
- actorManager->addChar(id, name);
+ if (actorManager == nullptr)
+ {
+ msg.readString(24, "name");
+ return;
+ }
+ actorManager->addChar(id, msg.readString(24, "name"));
}
void BeingRecv::processGraffiti(Net::MessageIn &msg)