api3 plugins will have a null value, needs handling

This commit is contained in:
Raymond 2021-09-22 08:47:06 -04:00
parent 300bcf4938
commit 18a3643fe6
2 changed files with 4 additions and 4 deletions

View file

@ -159,7 +159,7 @@ namespace Dalamud.Plugin.Internal
/// Gets the AssemblyName plugin, populated during <see cref="Load(PluginLoadReason, bool)"/>.
/// </summary>
/// <returns>Plugin type.</returns>
public AssemblyName AssemblyName { get; private set; } = null;
public AssemblyName? AssemblyName { get; private set; } = null;
/// <summary>
/// Gets the plugin name, directly from the plugin or if it is not loaded from the manifest.

View file

@ -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();