Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
Wrap with null check to avoid crash bug on quit for deployments (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenNaccarato authored and Vatyx committed Feb 26, 2019
1 parent 107d1bc commit 32d1b71
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ void USpatialGameInstance::Shutdown()
UWorld* World = GetWorld();
if (World != nullptr && SpatialConnection != nullptr && SpatialConnection->IsConnected())
{
Cast<USpatialNetDriver>(World->GetNetDriver())->HandleOnDisconnected(TEXT("Client shutdown"));
if (World->GetNetDriver() != nullptr)
{
Cast<USpatialNetDriver>(World->GetNetDriver())->HandleOnDisconnected(TEXT("Client shutdown"));
}
}

Super::Shutdown();
Expand Down

0 comments on commit 32d1b71

Please sign in to comment.