mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
SLUDGE: fix use-after-free in PeopleManager::killMostPeople
This commit is contained in:
parent
b503401c45
commit
373f0c91be
@ -837,7 +837,7 @@ void PeopleManager::killMostPeople() {
|
||||
for (OnScreenPersonList::iterator it = _allPeople->begin(); it != _allPeople->end(); ++it) {
|
||||
if (!((*it)->extra & EXTRA_NOREMOVE)) {
|
||||
OnScreenPerson *killPeople = (*it);
|
||||
_allPeople->reverse_erase(it);
|
||||
it = _allPeople->reverse_erase(it);
|
||||
|
||||
// Gone from the list... now free some memory
|
||||
if (killPeople->continueAfterWalking)
|
||||
|
Loading…
Reference in New Issue
Block a user