From e0d03099998d1a6c34791dea8ea0c3635aed3160 Mon Sep 17 00:00:00 2001 From: ManlyMarco <39247311+ManlyMarco@users.noreply.github.com> Date: Wed, 3 Nov 2021 02:31:11 +0100 Subject: [PATCH] [Profile] Fix exception when reentering maker --- src/Profile.Core/Profile.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Profile.Core/Profile.cs b/src/Profile.Core/Profile.cs index 05c67881..ed46a6b2 100644 --- a/src/Profile.Core/Profile.cs +++ b/src/Profile.Core/Profile.cs @@ -31,6 +31,7 @@ internal void Main() CharacterApi.RegisterExtraBehaviour("KK_Profile"); MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories; MakerAPI.MakerFinishedLoading += MakerAPI_MakerFinishedLoading; + MakerAPI.MakerExiting += MakerAPI_MakerExiting; } private void MakerAPI_MakerFinishedLoading(object sender, System.EventArgs e) @@ -70,5 +71,10 @@ private void MakerAPI_RegisterCustomSubCategories(object sender, RegisterSubCate //Starts throwing errors at some point after 30,000 characters ProfileTextbox.CharacterLimit = 30000; } + + private void MakerAPI_MakerExiting(object sender, System.EventArgs e) + { + ProfileTextbox = null; + } } }