GetOwningPlayerPawn is NULL while GetPawn() is valid?

(click on the link below in the post to enlarge or RMB > View Image)

// Code in PlayerController
if (GetPawn() == nullptr)
{	
	LOG_ERROR("The pawn is NULL for player: %s.", *(PlayerState != nullptr ? PlayerState->PlayerName : "<Unknown Player>"))
}
CreateWidgets();

The error is never logged and the Pawn is valid and is possessed by the PlayerController. However, the BluePrint-GUI complains about the GetOwningPlayerPawn-node returning a null-value. Note that this is multiplayer and I create the widgets (hopefully) on the owning client:

// In PlayerController header
UFUNCTION(Client, Reliable, BlueprintCallable, Category = "PlayerEyeController|GUI")
void CreateWidgets();
void CreateWidgets_Implementation();

The actual line of code (also inside the PlayerController class). Note that GUI_PlayerEye_Class is a Blueprint class. Also this problem only occurs in multiplayer, it works in singleplayer:

GUI_PlayerEye = CreateWidget<UPlayerEye_GUI>(this, GUI_PlayerEye_Class);

Hey there, make sure when you execute Create Widget, the Owning Controller you supply is valid.

Hey, I don’t think that could be it because I construct the widget inside the PlayerController and pass it as this. I assume that this is always valid in this case. I edited the OP to include this as it may not have been very clear. Sorry!.

Thanks that solved it.

Try using GetOwningPlayer instead of GetOwningPlayerPawn + Get Controller.