[Server] Fix invalid read

sol2-server-rewrite
Koncord 7 years ago
parent 69436714f9
commit a9614ad28e

@ -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…
Cancel
Save