forked from mirror/openmw-tes3mp
[Server] Fix invalid read
This commit is contained in:
parent
69436714f9
commit
a9614ad28e
1 changed files with 2 additions and 1 deletions
|
@ -87,8 +87,9 @@ void Players::deletePlayerByPID(int pid)
|
|||
if (it != ls.end())
|
||||
{
|
||||
(*it)->markedForDeletion = true;
|
||||
size_t useCount = it->use_count();
|
||||
ls.erase(it);
|
||||
LOG_APPEND(Log::LOG_TRACE, "- references: %d", it->use_count());
|
||||
LOG_APPEND(Log::LOG_TRACE, "- references: %d", useCount - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue