Changing pitch/roll max in PlayerCameraManager crashes UE4 every time

I have a barely-modified version of the character from the base First Persion C++ template, which all works fine, but adding this block of code in the constructor causes crashes UE4 editor the moment I build it:

ATestProjectCharacter::ATestProjectCharacter()
{
	APlayerCameraManager* CameraManager = UGameplayStatics::GetPlayerCameraManager(GetWorld(), 0);
	CameraManager->ViewPitchMax = 360;
	CameraManager->ViewRollMax = 360;

So, obviously I’m doing something wrong here, but it builds fine in VS, and it looks fine to me. Since this is a crash to desktop I don’t have any feedback that could tell me what’s gone wrong.

Anyone have any idea what’s going on here?