Fix crash introduced in 8199 (5a30b77777b7)
--HG-- branch : trunk
This commit is contained in:
@@ -470,7 +470,6 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
|
|||||||
LoginDatabase.PExecute("INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (%u, %u, %u)", charcount, GetAccountId(), realmID);
|
LoginDatabase.PExecute("INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (%u, %u, %u)", charcount, GetAccountId(), realmID);
|
||||||
|
|
||||||
pNewChar->CleanupsBeforeDelete();
|
pNewChar->CleanupsBeforeDelete();
|
||||||
delete pNewChar; // created only to call SaveToDB()
|
|
||||||
|
|
||||||
data << (uint8)CHAR_CREATE_SUCCESS;
|
data << (uint8)CHAR_CREATE_SUCCESS;
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
@@ -478,6 +477,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
|
|||||||
std::string IP_str = GetRemoteAddress();
|
std::string IP_str = GetRemoteAddress();
|
||||||
sLog.outBasic("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
|
sLog.outBasic("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
|
||||||
sLog.outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
|
sLog.outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
|
||||||
|
delete pNewChar; // created only to call SaveToDB()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user