Unity.IL2CPP.NullChecksSupport.WriteNullCheckIfNeeded C# (CSharp) Method

WriteNullCheckIfNeeded() public method

public WriteNullCheckIfNeeded ( StackInfo stackInfo ) : void
stackInfo StackInfo
return void
        public void WriteNullCheckIfNeeded(StackInfo stackInfo)
        {
            if ((this.ShouldEmitNullChecksForMethod() && !Extensions.IsValueType(stackInfo.Type)) && (!stackInfo.Type.IsByReference || !((ByReferenceType) stackInfo.Type).ElementType.IsValueType))
            {
                this.RecordNullCheckEmitted();
                object[] args = new object[] { Emit.NullCheck(stackInfo.Type, stackInfo.Expression) };
                this._writer.WriteLine("{0};", args);
            }
        }