From 8dcf343dac528d5c4404b71a3bb6e68285aab9d2 Mon Sep 17 00:00:00 2001 From: Valeria Date: Thu, 24 Aug 2023 17:03:56 +0200 Subject: [PATCH] Fix Selectable object "something" is already assigned Add a try/catch to fix the "Selectable object 'something' is already assigned" on startup that happens on some systems. For example: Selectable object FlirtyIntroductionInteraction is already assigned Please see issue #146 --- Constructor5.Base/Startup/StartupEvents.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Constructor5.Base/Startup/StartupEvents.cs b/Constructor5.Base/Startup/StartupEvents.cs index 2d25d1a1..d94a8e02 100644 --- a/Constructor5.Base/Startup/StartupEvents.cs +++ b/Constructor5.Base/Startup/StartupEvents.cs @@ -14,7 +14,14 @@ public static void TypeActions() { foreach (var attribute in type.GetCustomAttributes()) { - attribute.Invoke(type); + try + { + attribute.Invoke(type); + } + catch(System.Exception ee) + { + Console.WriteLine(ee.Message); + } } } }