Browse Source

Fix for bug found during running unit tests

auz34 11 years ago
parent
commit
5e98352a67
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Jint/Runtime/ExpressionIntepreter.cs

+ 1 - 1
Jint/Runtime/ExpressionIntepreter.cs

@@ -797,7 +797,7 @@ namespace Jint.Runtime
             var func = _engine.GetValue(callee);
             var func = _engine.GetValue(callee);
             
             
             var r = callee as Reference;
             var r = callee as Reference;
-            var stackItem = new Tuple<CallExpression, JsValue, string>(callExpression, func, r.GetReferencedName());
+            var stackItem = new Tuple<CallExpression, JsValue, string>(callExpression, func, r != null ? r.GetReferencedName() : "anonymous function");
 
 
             var recursionDepth = _engine.CallStack.Count(ce => ce.Item1 == callExpression || ce.Item2 == func);
             var recursionDepth = _engine.CallStack.Count(ce => ce.Item1 == callExpression || ce.Item2 == func);