Bugfix Crouch Crashing Game

This commit is contained in:
Philip W 2023-03-06 15:00:08 +00:00
parent b16f632537
commit 6db0770582

View File

@ -69,7 +69,7 @@ void ATempCharacter::Sneak()
for (AActor* Actor : AIActors)
{
USphereComponent* SphereComponent = Actor->FindComponentByClass<USphereComponent>();
if (SphereComponent != nullptr)
if (IsValid(SphereComponent))
{
SphereComponent->SetSphereRadius(40.0f); //default value
}