Fix error in log about existing command.

This commit is contained in:
Ottermandias 2023-10-04 14:03:51 +02:00
parent fb591429d6
commit 5fefdfa33b

View file

@ -47,7 +47,8 @@ public class CommandHandler : IDisposable
_collectionEditor = collectionEditor;
framework.RunOnFrameworkThread(() =>
{
_commandManager.RemoveHandler(CommandName);
if (_commandManager.Commands.ContainsKey(CommandName))
_commandManager.RemoveHandler(CommandName);
_commandManager.AddHandler(CommandName, new CommandInfo(OnCommand)
{
HelpMessage = "Without arguments, toggles the main window. Use /penumbra help to get further command help.",