Skip to content

Commit

Permalink
Shutdown if attached game closes
Browse files Browse the repository at this point in the history
  • Loading branch information
Raicuparta committed Oct 9, 2023
1 parent 0b18b49 commit 86c0d72
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions UnrealVR/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ private void Update_InjectorConnectionStatus() {
lastFrontendSignal = now;
}
} else {
if (m_connected && m_commandLineAttachExe.Length != 0)

Check warning on line 363 in UnrealVR/MainWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.

Check warning on line 363 in UnrealVR/MainWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.

Check warning on line 363 in UnrealVR/MainWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.

Check warning on line 363 in UnrealVR/MainWindow.xaml.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
{
// If we launched with an attached game exe, we shut ourselves down once that game closes.
Application.Current.Shutdown();
return;
}

m_connectionStatus.Text = UnrealVRConnectionStatus.NoInstanceDetected;
m_connected = false;
Hide_ConnectionOptions();
Expand Down

0 comments on commit 86c0d72

Please sign in to comment.