From 9f0daee186dc815cbf4e8a68871d375bd4752737 Mon Sep 17 00:00:00 2001 From: erorcun Date: Wed, 30 Jun 2021 03:31:10 +0300 Subject: Sanitizer fixes --- src/peds/CopPed.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/peds/CopPed.cpp') diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp index 1efd7733..fbfa7249 100644 --- a/src/peds/CopPed.cpp +++ b/src/peds/CopPed.cpp @@ -644,6 +644,9 @@ CCopPed::ProcessControl(void) int numCopsNear = 0; for (int i = 0; i < player->m_numNearPeds; ++i) { CPed *nearPed = player->m_nearPeds[i]; +#ifdef FIX_BUGS + if (nearPed) +#endif if (nearPed->m_nPedType == PEDTYPE_COP && nearPed->m_nPedState != PED_DEAD) ++numCopsNear; } -- cgit v1.2.3