I have compiled 4.8 UE (without hotfix). When i compile my editor with my game module and run the game from editor, the game crashes in BeginDestroy() of my player controller class on line where Im getting timer manager to clear my timer. I solved this by adding nullptr check (below).
2 questions:
Why is Destroy called on player controller when the game has just been started?
Why the controller doesnt have its world set when being destroyed?
Ill try to replicate it if needed, I did a quick fix and posted this question later.
UWorld* AActor::() const
{
// CDO objects do not belong to a world
// If the actors outer is destroyed or unreachable we are shutting down and the world should be NULL
return (!HasAnyFlags(RF_ClassDefaultObject) && !GetOuter()->HasAnyFlags(RF_BeginDestroyed|RF_Unreachable) ? GetLevel()->OwningWorld : NULL);
}
In other words, when object is being destroyed World is inaccessible from that object, because that object stop being part of any world.