Skip to content

Commit d136cb4

Browse files
committed
in case none of the desired type
1 parent b9e02c3 commit d136cb4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Source/SplashSettings/Private/SplashSettings.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ void FSplashSettingsModule::StartupModule()
1010
IFileManager::Get().FindFiles(AllSplashFiles, *(SplashDirectory / TEXT("*.jpg")), true, false);
1111
IFileManager::Get().FindFiles(AllSplashFiles, *(SplashDirectory / TEXT("*.bmp")), true, false);
1212

13-
if (!AllSplashFiles.Num())
14-
{
15-
return;
16-
}
17-
1813
const TArray<FString>& SplashFiles = AllSplashFiles.FilterByPredicate([&](const FString& File) {
1914
#if WITH_EDITOR
2015
return File.StartsWith(TEXT("EdSplash"));
@@ -23,6 +18,11 @@ void FSplashSettingsModule::StartupModule()
2318
#endif
2419
});
2520

21+
if (!SplashFiles.Num())
22+
{
23+
return;
24+
}
25+
2626
FGenericPlatformSplash::SetCustomSplashImage(*FPaths::ConvertRelativePathToFull(FPaths::ProjectContentDir() / TEXT("Splash") / SplashFiles[FMath::RandRange(0, SplashFiles.Num() - 1)]));
2727
}
2828

0 commit comments

Comments
 (0)