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 }