ActionVariable actionVar.GetVariables can return null.

This commit is contained in:
albertmata 2016-03-18 18:43:20 +01:00
parent 416acc90f8
commit 47cd94dfff

View file

@ -2162,12 +2162,16 @@ namespace AsterNET.Manager
}
IActionVariable actionVar = action as IActionVariable;
if(actionVar != null && actionVar.GetVariables().Count > 0)
if ( actionVar != null )
{
sb.Append(string.Concat("Variable: ", Helper.JoinVariables(actionVar.GetVariables(), VAR_DELIMITER, "="), Common.LINE_SEPARATOR));
var variables = actionVar.GetVariables();
if ( variables != null && variables.Count > 0 )
{
sb.Append( string.Concat( "Variable: ", Helper.JoinVariables( actionVar.GetVariables(), VAR_DELIMITER, "=" ), Common.LINE_SEPARATOR ) );
}
}
sb.Append(Common.LINE_SEPARATOR);
sb.Append(Common.LINE_SEPARATOR);
return sb.ToString();
}
#endregion