Pointer to C++ Class invalid after start, Accessed None trying to read property

The check macro doesn’t trigger anything. I can print the Log after the check.

If inside AFirstPlayer class I do something like this


    class UStatistics* Stastistics;

protected:
    // Called when the game starts or when spawned
    virtual void BeginPlay() override;

public:    

    UFUNCTION(BlueprintCallable)
    class UStatistics* GetStat() const
    {
        return Stastistics;
    }

The blueprint works without problems. FYI I didn’t change how I’m initializing the Statistics variable, always with CreateDefaultSubobject function.
I can call all functions from the event graph of the blueprint without any problem. I really don’t understand why this is happening.