Accessing private variable crashes editor

Hello, I have a C++ class that is inherited from Actor class. Class is called “Chair”

In the Chair.h I’m creating a private variable:
private:

    //Pointer to a Player Controller
	APlayerController * PlayerController;

Later in the Chair.cpp in the constructor I’m trying to access that pointer.

AChair::AChair()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	// Set to primary Player Controller
	PlayerController = GetWorld()->GetFirstPlayerController();
}

This hard-crashes the editor without so much as error message (the error window appears and says there’s no error information. Furthermore, when trying to open the project again, it again crashes every time I try to load a project at 71%.
The only solution is to edit Chair.cpp file (commenting or removing PlayerController initialization), and then remove “Intermediate” and “Build” folders from the project, allowing the project to rebuild on startup.

If I do not go the private variable route and create and access PlayerController in the “Tick()” function, it works well.

//Pointer to a Player Controller
     APlayerController * PlayerController = GetWorld()->GetFirstPlayerController();

It’s just that I’ll need this pointer several times in several functions, so I wanted to declare it as private class variable and retrieve the controller once in the constructor.

I tried to add UPROPERTY() to variable declaration to no effect.

What am I doing wrong? Or is this just a weird bug?

GetWorld in your AChar construct function(AChar::AChar) will return nullptr, then the next sentence to get player controller cause the crash.
You code has already been compiled to dll,so when you open your editor,crashed again.

First, include World.h

#include "Engine/World.h"

Then,write like this in the construct file,

UWorld *World = GetWorld();
if (World) {
    PlayerController = World->GetFirstPlayerController();
}

Tick function:

if (!PlayerController) {
    UWorld *World = GetWorld();
    if (World) {
        PlayerController = World->GetFirstPlayerController();
    }
}

Last,Use Visial studio or Xcode to compile the solution or workspace, you can open your editor again.

You can initialize the PlayerController in BeginPlay function.

Can I somehow make sure that is IS being initialized in the constructor of the class? I don’t really want to put an extra condition into Tick() function if I can help it. It just seems wrong - it will go through once, and then it will just work without reason and waste time millions of times.