fix: dispose DalamudPluginInterface if plugin init fails

This commit is contained in:
goat 2021-08-29 22:49:34 +02:00
parent 49345847a5
commit c0901e11ba
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -288,6 +288,7 @@ namespace Dalamud.Plugin.Internal
if (this.instance == null)
{
this.State = PluginState.LoadError;
this.DalamudInterface.Dispose();
Log.Error($"Error while loading {this.Name}, failed to bind and call the plugin constructor");
return;
}