[Crash] Fix player events reload when out of bounds (#4321)

This commit is contained in:
Chris Miles
2024-05-24 20:53:47 -05:00
committed by GitHub
parent 3a51f04291
commit 2586527157
+4
View File
@@ -642,6 +642,10 @@ void PlayerEventLogs::ProcessRetentionTruncation()
void PlayerEventLogs::ReloadSettings()
{
for (auto &e: PlayerEventLogSettingsRepository::All(*m_database)) {
if (e.id >= PlayerEvent::MAX || e.id < 0) {
continue;
}
m_settings[e.id] = e;
}
}