fix crash at launch

This commit is contained in:
Arnaud Jamin
2023-10-17 15:10:19 -04:00
parent 0d9a5b4457
commit 9b7304004d
@@ -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<AActor*> Actors;
for (TActorIterator<AActor> It(GetWorld(), SelectedClass); It; ++It)
for (TActorIterator<AActor> It(World, SelectedClass); It; ++It)
{
AActor* Actor = *It;
if (GetNameSafe(Actor) == SelectionName)