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,10 +2162,14 @@ namespace AsterNET.Manager
} }
IActionVariable actionVar = action as IActionVariable; IActionVariable actionVar = action as IActionVariable;
if(actionVar != null && actionVar.GetVariables().Count > 0) if ( actionVar != null )
{
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( 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(); return sb.ToString();