mirror of
https://github.com/osukey/osukey.git
synced 2025-07-17 16:30:11 +09:00
try-catch registry lookup to avoid crashes on non-windows platforms
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user