mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-12-22 03:46:39 +01:00
Try and fix weird nullref
Some checks failed
Release job / Create tag (push) Has been cancelled
Release job / Release for linux-arm64 (push) Has been cancelled
Release job / Release for linux-x64 (push) Has been cancelled
Release job / Release for win-x64 (push) Has been cancelled
Release job / Release MacOS universal (push) Has been cancelled
Some checks failed
Release job / Create tag (push) Has been cancelled
Release job / Release for linux-arm64 (push) Has been cancelled
Release job / Release for linux-x64 (push) Has been cancelled
Release job / Release for win-x64 (push) Has been cancelled
Release job / Release MacOS universal (push) Has been cancelled
This commit is contained in:
parent
fda79efed4
commit
f8c53f03fd
1 changed files with 4 additions and 4 deletions
|
@ -101,13 +101,13 @@ namespace Ryujinx.UI.Common.Helper
|
||||||
{
|
{
|
||||||
RegistryKey key = Registry.CurrentUser.OpenSubKey(@$"Software\Classes\{ext}");
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var openCmd = key.OpenSubKey(@"shell\open\command");
|
|
||||||
|
|
||||||
string keyValue = (string)openCmd.GetValue(string.Empty);
|
string keyValue = (string)openCmd.GetValue(string.Empty);
|
||||||
|
|
||||||
return keyValue is not null && (keyValue.Contains("Ryujinx") || keyValue.Contains(AppDomain.CurrentDomain.FriendlyName));
|
return keyValue is not null && (keyValue.Contains("Ryujinx") || keyValue.Contains(AppDomain.CurrentDomain.FriendlyName));
|
||||||
|
|
Loading…
Reference in a new issue