fix a potential crash

This commit is contained in:
Mamadou Babaei
2023-05-18 21:26:28 +02:00
parent 4bb733e43f
commit 69740fc4da
@@ -1417,6 +1417,11 @@ void ASGPawn::FImpl::DisableActorPhysics(const AActor* Actor) const
void ASGPawn::FImpl::EnableActorPhysics(const AActor* Actor) const
{
if (!IsValid(Actor))
{
return;
}
TArray<USceneComponent*> ActorComponents;
Actor->GetComponents(ActorComponents);
for (USceneComponent* SceneComponent: ActorComponents)