Merge pull request #3033 from Flow-Launcher/VictoriousRaptor-patch-1

Null check when detecting Windows Media Player installation
This commit is contained in:
Jeremy Wu 2024-10-16 14:53:30 +11:00 committed by GitHub
commit 6d6c1bed11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,6 @@ internal static class WindowsMediaPlayerHelper
internal static bool IsWindowsMediaPlayerInstalled()
{
using var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\MediaPlayer");
return key.GetValue("Installation Directory") != null;
return key?.GetValue("Installation Directory") != null;
}
}