From ea3aa37609545e3e9874232fb012a981380a9163 Mon Sep 17 00:00:00 2001 From: Riley Date: Mon, 27 May 2024 23:37:44 -0500 Subject: [PATCH] Possible crash fix? --- Amalgam/src/Hooks/CTFRagdoll_CreateTFRagdoll.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Amalgam/src/Hooks/CTFRagdoll_CreateTFRagdoll.cpp b/Amalgam/src/Hooks/CTFRagdoll_CreateTFRagdoll.cpp index bf73efc..2c3305c 100644 --- a/Amalgam/src/Hooks/CTFRagdoll_CreateTFRagdoll.cpp +++ b/Amalgam/src/Hooks/CTFRagdoll_CreateTFRagdoll.cpp @@ -24,7 +24,8 @@ MAKE_HOOK(CTFRagdoll_CreateTFRagdoll, S::CTFRagdoll_CreateTFRagdoll(), void, __f if (!Vars::Visuals::Ragdolls::Enabled.Value) return CALL_ORIGINAL(ecx); - if (auto pEntity = static_cast(ecx)) + auto pEntity = static_cast(ecx); + if (pEntity) { if (Vars::Visuals::Ragdolls::EnemyOnly.Value) {