mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
Character Select: Fix deleted memory access (#1237)
This commit is contained in:
parent
025ff593ce
commit
3a37f9581c
@ -394,12 +394,13 @@ void Character::SetIsNewLogin() {
|
||||
|
||||
auto* currentChild = flags->FirstChildElement();
|
||||
while (currentChild) {
|
||||
auto* nextChild = currentChild->NextSiblingElement();
|
||||
if (currentChild->Attribute("si")) {
|
||||
flags->DeleteChild(currentChild);
|
||||
LOG("Removed isLoggedIn flag from character %i:%s, saving character to database", GetID(), GetName().c_str());
|
||||
WriteToDatabase();
|
||||
}
|
||||
currentChild = currentChild->NextSiblingElement();
|
||||
currentChild = nextChild;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user