[Crash] Fix out of bound arrays, other potential crashes (#3166)

This commit is contained in:
Aeadoin
2023-04-01 12:44:41 -04:00
committed by GitHub
parent 0d509a7f3a
commit 0df84e1ee6
9 changed files with 34 additions and 24 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
}
}
if (m_dz_switch_id != 0) {
if (sender && m_dz_switch_id != 0) {
sender->UpdateTasksOnTouchSwitch(m_dz_switch_id);
if (sender->TryMovePCDynamicZoneSwitch(m_dz_switch_id)) {
safe_delete(outapp);