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 #endregion
#region Equals #region Equals
public bool Equals(CurveKey other) public bool Equals(CurveKey other)
{ {
return try
other.Position == Position && {
other.Value == Value && return other.Position == Position &&
other.TangentIn == TangentIn && other.Value == Value &&
other.TangentOut == TangentOut && other.TangentIn == TangentIn &&
other.Continuity == Continuity; other.TangentOut == TangentOut &&
} other.Continuity == Continuity;
}
catch (NullReferenceException e)
{
return ((object)this)==null;
}
}
public override bool Equals(object obj) public override bool Equals(object obj)
{ {