mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-16 13:37:03 +00:00
Try and fix weird nullref
This commit is contained in:
parent
554e0d1141
commit
25454d0ab1
1 changed files with 4 additions and 4 deletions
|
|
@ -76,13 +76,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 keyValue = (string)openCmd.GetValue("");
|
||||||
|
|
||||||
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…
Add table
Add a link
Reference in a new issue