Skip to content

Commit

Permalink
Catch wmic exceptions so they don't mess up device initialization (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak authored Dec 22, 2024
1 parent cbb54d6 commit 176dcf4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Assets/Scripts/Sharing/DriveAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,15 @@ private static string GetDeviceId()
Debug.LogError("Host id not implemented for iOS");
return "iOS-unknown";
default:
return GetPcId();
try
{
return GetPcId();
}
catch (Exception e)
{
// We suspect wmic.xe can cause an exception on some systems, so we catch it here.
return "PC-unknown";
}
}
}

Expand Down

0 comments on commit 176dcf4

Please sign in to comment.