diff --git a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Selection.cpp b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Selection.cpp index f964a86..35ff52f 100644 --- a/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Selection.cpp +++ b/Plugins/Cog/Source/CogEngine/Private/CogEngineWindow_Selection.cpp @@ -58,6 +58,12 @@ void UCogEngineWindow_Selection::PostInitProperties() //-------------------------------------------------------------------------------------------------------------------------- void UCogEngineWindow_Selection::TryReapplySelection() const { + UWorld* World = GetWorld(); + if (World == nullptr) + { + return; + } + if (bReapplySelection == false) { return; @@ -75,7 +81,7 @@ void UCogEngineWindow_Selection::TryReapplySelection() const } TArray Actors; - for (TActorIterator It(GetWorld(), SelectedClass); It; ++It) + for (TActorIterator It(World, SelectedClass); It; ++It) { AActor* Actor = *It; if (GetNameSafe(Actor) == SelectionName)