Avoid exception log when updating a plugin that is not installed

This commit is contained in:
Aireil 2020-11-28 13:19:41 +01:00
parent f912e42f94
commit 82d811ed9d

View file

@ -216,11 +216,14 @@ namespace Dalamud.Plugin
Log.Verbose("wasEnabled: {0}", wasEnabled);
// Try to disable plugin if it is loaded
try {
this.dalamud.PluginManager.DisablePlugin(info);
} catch (Exception ex) {
Log.Error(ex, "Plugin disable failed");
//hasError = true;
if (wasEnabled) {
try {
this.dalamud.PluginManager.DisablePlugin(info);
}
catch (Exception ex) {
Log.Error(ex, "Plugin disable failed");
//hasError = true;
}
}
try {