Random Access Violation crashing

I’ve tried creating UWorld variable for the world and now the program crashes after I use GetWorld(). Is there something wrong with using GetWorld() inside an UObject?
image