From fc8afd45c7150385897b867bb2123d81f4bb9943 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 5 May 2011 16:52:05 -0700 Subject: [PATCH] Fix crash in debugger --- lib/_debugger.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index 859dc2c1af0..adde5004807 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -291,7 +291,10 @@ Client.prototype.reqEval = function(expression, cb) { var frame = bt.frames[self.currentFrame]; var evalFrames = frame.scopes.map(function(s) { - return bt.frames[s.index].index; + if (!s) return; + var x = bt.frames[s.index]; + if (!x) return; + return x.index; }); self._reqFramesEval(expression, evalFrames, cb);