From 26f81c06a7dee6e7a364039eec9de5de78bc2d86 Mon Sep 17 00:00:00 2001 From: "SND\\floAr_cp" Date: Sun, 20 Nov 2011 13:42:00 +0000 Subject: [PATCH] null reference error in curveKey corrected (used try catch and cast to object) --- ANX.Framework/CurveKey.cs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/ANX.Framework/CurveKey.cs b/ANX.Framework/CurveKey.cs index 9a594ed2..2f698a1d 100644 --- a/ANX.Framework/CurveKey.cs +++ b/ANX.Framework/CurveKey.cs @@ -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) {