From 1e319eb4960265435316d9f8a449742441c92e60 Mon Sep 17 00:00:00 2001 From: yck1509 Date: Sun, 21 Dec 2014 16:38:00 +0800 Subject: [PATCH] Fix multiple loading of plugin in GUI --- ConfuserEx/ComponentDiscovery.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ConfuserEx/ComponentDiscovery.cs b/ConfuserEx/ComponentDiscovery.cs index 6df97f110..4830e345f 100644 --- a/ConfuserEx/ComponentDiscovery.cs +++ b/ConfuserEx/ComponentDiscovery.cs @@ -54,10 +54,18 @@ public string PluginPath { } public void AddProtection(Info info) { + foreach (var comp in protections) { + if (comp.Id == info.id) + return; + } protections.Add(new InfoComponent(info)); } public void AddPacker(Info info) { + foreach (var comp in packers) { + if (comp.Id == info.id) + return; + } packers.Add(new InfoComponent(info)); }