ugameplaystatics::getplayercharacter(GetWorld(), 0)->GetName() crashes editor

I wouldn’t rely on UGameplayStatics::GetPlayerCharacter(0).

If you want to make sure it is the exact character, pass a reference of that Character into the Actor and then check against OtherActor.

Or, if you simply want to see if Other actor is a Character, you could do:

ACharacter *OtherCharacter = Cast<ACharacter>(OtherActor);
if(OtherCharacter)
{
    // Your code here...
}