0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 01:05:47 +00:00

Try and fix weird nullref

This commit is contained in:
Evan Husted 2024-11-19 10:22:11 -06:00
parent fda79efed4
commit f8c53f03fd

View file

@ -101,13 +101,13 @@ namespace Ryujinx.UI.Common.Helper
{
RegistryKey key = Registry.CurrentUser.OpenSubKey(@$"Software\Classes\{ext}");
if (key is null)
var openCmd = key?.OpenSubKey(@"shell\open\command");
if (openCmd is null)
{
return false;
}
var openCmd = key.OpenSubKey(@"shell\open\command");
string keyValue = (string)openCmd.GetValue(string.Empty);
return keyValue is not null && (keyValue.Contains("Ryujinx") || keyValue.Contains(AppDomain.CurrentDomain.FriendlyName));