mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Add null check for status variable
This shoulnd't change something on Windows 10, but it was effectively breaking the program in Windows 7
This commit is contained in:
parent
204d6c2fa2
commit
b4362c0917
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ public StartupTaskState State
|
|||
get
|
||||
{
|
||||
var status = (byte[])Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\StartupFolder", "ShareX.lnk", startupEnabled);
|
||||
if (!status.SequenceEqual(startupEnabled))
|
||||
if (status != null && !status.SequenceEqual(startupEnabled))
|
||||
{
|
||||
return StartupTaskState.DisabledByUser;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue