mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 09:35:25 +00:00
Even more safety
This commit is contained in:
parent
38d126ac64
commit
4c22341052
@ -20,10 +20,11 @@ public:
|
||||
|
||||
inline UStevesGameSubsystem* GetStevesGameSubsystem(UWorld* WorldContext)
|
||||
{
|
||||
if (IsValid(WorldContext) && IsValid(WorldContext->GetGameInstance()) &&
|
||||
WorldContext->IsGameWorld())
|
||||
if (IsValid(WorldContext) && WorldContext->IsGameWorld())
|
||||
{
|
||||
return WorldContext->GetGameInstance()->GetSubsystem<UStevesGameSubsystem>();
|
||||
auto GI = WorldContext->GetGameInstance();
|
||||
if (IsValid(GI))
|
||||
return GI->GetSubsystem<UStevesGameSubsystem>();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user