Why this piece of code makes my editor to crash?

GetCapsuleComponent()->InitCapsuleSize(400.0f, 350.0f);

	bUseControllerRotationPitch = false;
	bUseControllerRotationRoll = false;
	bUseControllerRotationYaw = false;

	GetCharacterMovement()->bCheatFlying = true;
	GetCharacterMovement()->RotationRate = FRotator(0.0f, 540.0f, 0.0f);
	GetCharacterMovement()->AirControl = 0.2f;
	GetCharacterMovement()->BrakingDecelerationFlying = 10.0f;
	GetCharacterMovement()->MaxFlySpeed = 300.0f;
	GetCharacterMovement()->bOrientRotationToMovement = true;
	GetCharacterMovement()->JumpZVelocity = 200.0f;

	CameraBoom->CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));
	CameraBoom->AttachTo(RootComponent);
	CameraBoom->bEnableCameraRotationLag = true;
	CameraBoom->TargetArmLength = 700.0f;
	CameraBoom->bUsePawnControlRotation = true;
	CameraBoom->CameraLagSpeed = 10.0f;

	FollowCamera->CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera"));
	FollowCamera->AttachTo(CameraBoom, USpringArmComponent::SocketName);
	FollowCamera->bUsePawnControlRotation = false;

Are CameraBoom and FollowCamera ever assigned to anything?

Should it be:

CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));

And:

FollowCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera"));

Instead?

You’re right… The error was in front of me the whole time… I should take a rest… Thank you

You save me a headache