Skip to content

Commit

Permalink
Fixed Engine crashing because of bad world call
Browse files Browse the repository at this point in the history
  • Loading branch information
StudioSyndiCatCaius committed Apr 21, 2023
1 parent 9b9dbbe commit 62d6be0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,19 @@ void UGameplayPauseComponent::BeginDestroy()
if(GetSubsys())
{
GetSubsys()->PauseComps.Remove(this);
Super::BeginDestroy();

}
Super::BeginDestroy();
}

UOmegaGameplaySubsystem* UGameplayPauseComponent::GetSubsys()
{
if(!SubsysRef)
{
SubsysRef = GetWorld()->GetSubsystem<UOmegaGameplaySubsystem>();
if(GetWorld())
{
SubsysRef = GetWorld()->GetSubsystem<UOmegaGameplaySubsystem>();
}
}
return SubsysRef;
}
Expand Down

0 comments on commit 62d6be0

Please sign in to comment.