From 18a3643fe612dd295a5d2e253c303fa5716bcbd8 Mon Sep 17 00:00:00 2001 From: Raymond Date: Wed, 22 Sep 2021 08:47:06 -0400 Subject: [PATCH] api3 plugins will have a null value, needs handling --- Dalamud/Plugin/Internal/LocalPlugin.cs | 2 +- Dalamud/Plugin/Internal/PluginManager.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dalamud/Plugin/Internal/LocalPlugin.cs b/Dalamud/Plugin/Internal/LocalPlugin.cs index c06c12c08..7310e5dca 100644 --- a/Dalamud/Plugin/Internal/LocalPlugin.cs +++ b/Dalamud/Plugin/Internal/LocalPlugin.cs @@ -159,7 +159,7 @@ namespace Dalamud.Plugin.Internal /// Gets the AssemblyName plugin, populated during . /// /// Plugin type. - public AssemblyName AssemblyName { get; private set; } = null; + public AssemblyName? AssemblyName { get; private set; } = null; /// /// Gets the plugin name, directly from the plugin or if it is not loaded from the manifest. diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs index d8bf6b802..54966765a 100644 --- a/Dalamud/Plugin/Internal/PluginManager.cs +++ b/Dalamud/Plugin/Internal/PluginManager.cs @@ -545,7 +545,7 @@ namespace Dalamud.Plugin.Internal } catch (InvalidPluginException) { - PluginLocations.Remove(plugin.AssemblyName.FullName); + PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty); throw; } catch (BannedPluginException) @@ -569,7 +569,7 @@ namespace Dalamud.Plugin.Internal } else { - PluginLocations.Remove(plugin.AssemblyName.FullName); + PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty); throw; } } @@ -589,7 +589,7 @@ namespace Dalamud.Plugin.Internal throw new InvalidPluginOperationException($"Unable to remove {plugin.Name}, not unloaded"); this.InstalledPlugins = this.InstalledPlugins.Remove(plugin); - PluginLocations.Remove(plugin.AssemblyName.FullName); + PluginLocations.Remove(plugin.AssemblyName?.FullName ?? string.Empty); this.NotifyInstalledPluginsChanged(); this.NotifyAvailablePluginsChanged();