From 16c7a859d8102061293662a83c71afcf4287b2e1 Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 15 Nov 2024 12:25:18 +0100 Subject: [PATCH] SA: Fix a missing null check in CTaskComplexSequence::Contains --- SilentPatchSA/PedSA.cpp | 2 +- SilentPatchSA/versionmeta.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SilentPatchSA/PedSA.cpp b/SilentPatchSA/PedSA.cpp index 63b308c..748820e 100644 --- a/SilentPatchSA/PedSA.cpp +++ b/SilentPatchSA/PedSA.cpp @@ -133,7 +133,7 @@ bool CTaskComplexSequence::Contains(int taskID) const { for (CTask* task : m_taskSequence) { - if (task->GetTaskType() == taskID) + if (task != nullptr && task->GetTaskType() == taskID) { return true; } diff --git a/SilentPatchSA/versionmeta.props b/SilentPatchSA/versionmeta.props index 2cc86a5..4310ded 100644 --- a/SilentPatchSA/versionmeta.props +++ b/SilentPatchSA/versionmeta.props @@ -6,7 +6,7 @@ .asi SilentPatch for San Andreas 33 - 1 + 2 2014-2024