From 82d811ed9d2c76fcefc9475a51cc041414074cdd Mon Sep 17 00:00:00 2001 From: Aireil <33433913+Aireil@users.noreply.github.com> Date: Sat, 28 Nov 2020 13:19:41 +0100 Subject: [PATCH] Avoid exception log when updating a plugin that is not installed --- Dalamud/Plugin/PluginRepository.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dalamud/Plugin/PluginRepository.cs b/Dalamud/Plugin/PluginRepository.cs index 6be3e9a95..c60d7565e 100644 --- a/Dalamud/Plugin/PluginRepository.cs +++ b/Dalamud/Plugin/PluginRepository.cs @@ -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 {