Engine crash while compile and restart

Quick question: Is there a way to wait until GetWorld() can be used and if so how?