Skip to content

Commit

Permalink
Guard nullable reference
Browse files Browse the repository at this point in the history
  • Loading branch information
TiberiumFusion committed Dec 29, 2023
1 parent c398314 commit 23041fd
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions QuickPatcher/Patcher.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,15 @@ private void PresentInstallVersionComboNotices()

if (friendsJsState.PatchStatus == ClientUiFriendsJsPatchStatus.AnyPatchInstalled)
{
if (PatchToInstallMetadata.Level0.Version < friendsJsState.PatchMetadata.Level0.Version)
Vis_DowngradeWarning = Visibility.Visible;
else if (PatchToInstallMetadata.Level0.Version == friendsJsState.PatchMetadata.Level0.Version)
Vis_NogradeWarning = Visibility.Visible;
else if (PatchToInstallMetadata.Level0.Version > friendsJsState.PatchMetadata.Level0.Version)
Vis_UpgradeWarning = Visibility.Visible;
if (friendsJsState.PatchMetadata != null)
{
if (PatchToInstallMetadata.Level0.Version < friendsJsState.PatchMetadata.Level0.Version)
Vis_DowngradeWarning = Visibility.Visible;
else if (PatchToInstallMetadata.Level0.Version == friendsJsState.PatchMetadata.Level0.Version)
Vis_NogradeWarning = Visibility.Visible;
else if (PatchToInstallMetadata.Level0.Version > friendsJsState.PatchMetadata.Level0.Version)
Vis_UpgradeWarning = Visibility.Visible;
}
}
}
}
Expand Down

0 comments on commit 23041fd

Please sign in to comment.