From d161cf42cd2a1752e2be5f49b467932a801aede1 Mon Sep 17 00:00:00 2001 From: linkaimian <1908920+stlnkm@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:17:20 +0800 Subject: [PATCH] Fix potential crash --- .../HotPatcherCore/Private/FlibHotPatcherCoreHelper.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HotPatcher/Source/HotPatcherCore/Private/FlibHotPatcherCoreHelper.cpp b/HotPatcher/Source/HotPatcherCore/Private/FlibHotPatcherCoreHelper.cpp index 004f3410..4c80e240 100644 --- a/HotPatcher/Source/HotPatcherCore/Private/FlibHotPatcherCoreHelper.cpp +++ b/HotPatcher/Source/HotPatcherCore/Private/FlibHotPatcherCoreHelper.cpp @@ -1188,7 +1188,10 @@ FPatchVersionDiff UFlibHotPatcherCoreHelper::DiffPatchVersionWithPatchSetting(co } for(const auto& Platform:PatchSetting.GetPakTargetPlatforms()) { - VersionDiffInfo.PlatformExternDiffInfo.Find(Platform)->DeleteExternalFiles.Empty(); + if (auto PlatExtDiffInfo = VersionDiffInfo.PlatformExternDiffInfo.Find(Platform)) + { + PlatExtDiffInfo->DeleteExternalFiles.Empty(); + } } }