mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +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();
|
auto* currentChild = flags->FirstChildElement();
|
||||||
while (currentChild) {
|
while (currentChild) {
|
||||||
|
auto* nextChild = currentChild->NextSiblingElement();
|
||||||
if (currentChild->Attribute("si")) {
|
if (currentChild->Attribute("si")) {
|
||||||
flags->DeleteChild(currentChild);
|
flags->DeleteChild(currentChild);
|
||||||
LOG("Removed isLoggedIn flag from character %i:%s, saving character to database", GetID(), GetName().c_str());
|
LOG("Removed isLoggedIn flag from character %i:%s, saving character to database", GetID(), GetName().c_str());
|
||||||
WriteToDatabase();
|
WriteToDatabase();
|
||||||
}
|
}
|
||||||
currentChild = currentChild->NextSiblingElement();
|
currentChild = nextChild;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user