diff --git a/Runtime/World/CActorModelParticles.cpp b/Runtime/World/CActorModelParticles.cpp index d9fe51a7c..ef9c22117 100644 --- a/Runtime/World/CActorModelParticles.cpp +++ b/Runtime/World/CActorModelParticles.cpp @@ -523,9 +523,13 @@ void CActorModelParticles::PointGenerator(void* ctx, } void CActorModelParticles::SetupHook(TUniqueId uid) { - auto search = FindSystem(uid); - if (search != x0_items.cend()) - CSkinnedModel::SetPointGeneratorFunc((void*)&*search, PointGenerator); + const auto search = FindSystem(uid); + + if (search == x0_items.cend()) { + return; + } + + CSkinnedModel::SetPointGeneratorFunc(&*search, PointGenerator); } std::list::iterator CActorModelParticles::FindSystem(TUniqueId uid) {