fix: guard against CommandInfo, Manifest ever becoming null

This commit is contained in:
goat 2023-06-20 19:35:59 +02:00
parent 28e9d5f156
commit d1c22f7dd6
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
3 changed files with 6 additions and 3 deletions

View file

@ -2174,7 +2174,10 @@ internal class PluginInstallerWindow : Window, IDisposable
if (plugin.IsLoaded)
{
var commands = commandManager.Commands
.Where(cInfo => cInfo.Value.ShowInHelp && cInfo.Value.LoaderAssemblyName == plugin.Manifest.InternalName)
.Where(cInfo =>
cInfo.Value != null &&
cInfo.Value.ShowInHelp &&
cInfo.Value.LoaderAssemblyName == plugin.Manifest.InternalName)
.ToArray();
if (commands.Any())