Skip to content

Commit

Permalink
[Profile] Fix exception when reentering maker
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Nov 3, 2021
1 parent a7da589 commit e0d0309
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Profile.Core/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ internal void Main()
CharacterApi.RegisterExtraBehaviour<ProfileController>("KK_Profile");
MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;
MakerAPI.MakerFinishedLoading += MakerAPI_MakerFinishedLoading;
MakerAPI.MakerExiting += MakerAPI_MakerExiting;
}

private void MakerAPI_MakerFinishedLoading(object sender, System.EventArgs e)
Expand Down Expand Up @@ -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;
}
}
}

0 comments on commit e0d0309

Please sign in to comment.