Fix the Add Section crash.

This commit is contained in:
GlenCFL 2017-12-08 07:18:17 -05:00
parent 86ff670fb0
commit 07fdc2eb49
1 changed files with 4 additions and 1 deletions

View File

@ -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);