mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed possible crash while searching the steam-path
This commit is contained in:
parent
526bc2661a
commit
2c9dc821e5
@ -129,10 +129,9 @@ namespace Artemis.Utilities
|
|||||||
|
|
||||||
public static string FindSteamGame(string relativePath)
|
public static string FindSteamGame(string relativePath)
|
||||||
{
|
{
|
||||||
var key = Registry.CurrentUser.OpenSubKey(@"Software\Valve\Steam");
|
var path = Registry.CurrentUser.OpenSubKey(@"Software\Valve\Steam")?.GetValue("SteamPath")?.ToString();
|
||||||
if (key == null)
|
if (path == null)
|
||||||
return null;
|
return null;
|
||||||
var path = key.GetValue("SteamPath").ToString();
|
|
||||||
var libFile = path + @"\steamapps\libraryfolders.vdf";
|
var libFile = path + @"\steamapps\libraryfolders.vdf";
|
||||||
if (!File.Exists(libFile))
|
if (!File.Exists(libFile))
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user