Crash after creating widget on death

Okay, still haven’t fixed this.

I’ve made sure the player controller exists and isn’t null, the widget exists and isn’t null.
Whenever ‘AddToViewport’ is called it crashes.

if
(URespawnCPP* RespawnUserWidget = CreateWidget(controller, RespawnWidget.LoadSynchronous()))

{

 controller->SetInputMode(FInputModeUIOnly());

 controller->bShowMouseCursor = true;

 RespawnUserWidget->AddToViewport();

}