diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
commit | ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch) | |
tree | c3d7c79fca18ac387d0c90512ef3201c92da5890 /src/net/eathena/beingrecv.cpp | |
parent | 22b64d16b613c1e5b26632237879b167024788ab (diff) | |
download | plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2 plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip |
Move some variables to better scope.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 9 |
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) |