From 07fdc2eb49291104f703235f35dd343973c3481b Mon Sep 17 00:00:00 2001 From: GlenCFL Date: Fri, 8 Dec 2017 07:18:17 -0500 Subject: [PATCH] Fix the Add Section crash. --- .../Commands/ItemFilterScript/AddCommentBlockCommand.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Filtration.ObjectModel/Commands/ItemFilterScript/AddCommentBlockCommand.cs b/Filtration.ObjectModel/Commands/ItemFilterScript/AddCommentBlockCommand.cs index 1c627df..1d951a6 100644 --- a/Filtration.ObjectModel/Commands/ItemFilterScript/AddCommentBlockCommand.cs +++ b/Filtration.ObjectModel/Commands/ItemFilterScript/AddCommentBlockCommand.cs @@ -15,7 +15,10 @@ namespace Filtration.ObjectModel.Commands.ItemFilterScript } public void Execute() { - _newItemFilterBlock = new ItemFilterCommentBlock(_itemFilterScript); + _newItemFilterBlock = new ItemFilterCommentBlock(_itemFilterScript) + { + Comment = string.Empty + }; if (_addAfterItemFilterBlock != null) { _itemFilterScript.ItemFilterBlocks.Insert(_itemFilterScript.ItemFilterBlocks.IndexOf(_addAfterItemFilterBlock) + 1, _newItemFilterBlock);