diff --git a/Core/Commands/DeleteOperatorsCommand.cs b/Core/Commands/DeleteOperatorsCommand.cs index 0900bf1..c5e2522 100644 --- a/Core/Commands/DeleteOperatorsCommand.cs +++ b/Core/Commands/DeleteOperatorsCommand.cs @@ -107,6 +107,11 @@ public void Undo() public void Do() { + if (_removeKeyframesCommand == null) + { + return; + } + _removeKeyframesCommand.Do(); var parent = MetaManager.Instance.GetMetaOperator(_parentMetaID); diff --git a/Core/UndoRedoStack.cs b/Core/UndoRedoStack.cs index 6785a26..f67ae09 100644 --- a/Core/UndoRedoStack.cs +++ b/Core/UndoRedoStack.cs @@ -297,7 +297,7 @@ public bool ProcessReceivedCommands() public void Add(ICommand command) { - if (command.IsUndoable) + if (command != null && command.IsUndoable) { var jsonCommand = SerializeCommand(command); #if USE_COUCHDB