Engine Crashing on if Statements??

I don’t see a casting in the video.

try like this:

class MyCharacter : public ACharacter
{
public:
UPROPERTY()
UMyObject *MyUPointer;

void SomeMethodToIntantiateMyUPoiner()
{
//create widget or NewObjet or whatever
}
}

class MyComponent : public UActorComponent
{
public:
UPROPERTY()
UMyObject *MyOtherUPointer;

void GetValidInstance()
{
MyOtherUPointer = Cast< MyCharacter >(GetOwner())->MyUPointer;
}
}