try-catch registry lookup to avoid crashes on non-windows platforms

This commit is contained in:
Dean Herbert
2020-06-22 16:34:04 +09:00
parent 2d121b4e3d
commit fc31d49629

View File

@ -238,6 +238,8 @@ namespace osu.Game.Tournament.IPC
{
Logger.Log("Trying to find stable in registry");
try
{
string stableInstallPath;
using (RegistryKey key = Registry.ClassesRoot.OpenSubKey("osu"))
@ -245,6 +247,10 @@ namespace osu.Game.Tournament.IPC
if (ipcFileExistsInDirectory(stableInstallPath))
return stableInstallPath;
}
catch
{
}
return null;
}