That was it! Thx.
I needed to add protection :
if (GEngine == NULL) return;
if (GEngine->GameViewport == NULL) return;
but then I get a world. Must test it better tonight but I think that was it.
UWorld* world = GEngine->GameViewport->GetWorld();