Can't find player

A crash in that line most likely indicates that something in that chain is null at the time of execution.

You can figure out what it is by expanding that chained call into something like this:

UWorld* world = GetWorld();

if(world)
{
	APlayerController* pc = world->GetFirstPlayerController();
	
	if(pc)
	{
		APawn* pawn = pc->GetPawn();
		
		if(pawn)
		{
			// if we get here we're fine
		}
		else
		{		
			UE_LOG(LogTemp, Warning, TEXT("Oh noes, PAWN is null"));
		}
	}
	else
	{
		UE_LOG(LogTemp, Warning, TEXT("Oh noes, PC is null"));
	}
	
}
else
{
	UE_LOG(LogTemp, Warning, TEXT("Oh noes, WORLD is null"));
}

Now, after this, the fun part starts of figuring out why any of these are null.

At which stage of the startup process are you calling this? E.g. during YourGameMode’s BeginPlay, OnConstruction etc.