null reference error in curveKey corrected (used try catch and cast to object)

This commit is contained in:
SND\floAr_cp 2011-11-20 13:42:00 +00:00
parent 58a839db81
commit 26f81c06a7

View File

@ -114,15 +114,21 @@ namespace ANX.Framework
#endregion
#region Equals
public bool Equals(CurveKey other)
{
return
other.Position == Position &&
other.Value == Value &&
other.TangentIn == TangentIn &&
other.TangentOut == TangentOut &&
other.Continuity == Continuity;
}
public bool Equals(CurveKey other)
{
try
{
return other.Position == Position &&
other.Value == Value &&
other.TangentIn == TangentIn &&
other.TangentOut == TangentOut &&
other.Continuity == Continuity;
}
catch (NullReferenceException e)
{
return ((object)this)==null;
}
}
public override bool Equals(object obj)
{