From 6db07705820e580ae28d0c9875ffa8054785aef8 Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Mon, 6 Mar 2023 15:00:08 +0000 Subject: [PATCH] Bugfix Crouch Crashing Game --- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 30376e3..f7c14ed 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -69,7 +69,7 @@ void ATempCharacter::Sneak() for (AActor* Actor : AIActors) { USphereComponent* SphereComponent = Actor->FindComponentByClass(); - if (SphereComponent != nullptr) + if (IsValid(SphereComponent)) { SphereComponent->SetSphereRadius(40.0f); //default value }