From 1f041fe73e73e69b0253deb0df58e856f3b650e1 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 27 Jan 2011 17:44:42 -0800 Subject: [PATCH] debugger: prevent crash when backtrace doesn't come back --- lib/_debugger.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/_debugger.js b/lib/_debugger.js index c23e3fc3dff..0618e4e8166 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -261,6 +261,12 @@ Client.prototype.reqEval = function(expression, cb) { // Otherwise we need to get the current frame to see which scopes it has. this.reqBacktrace(function(bt) { + if (!bt.frames) { + // ?? + cb({}); + return; + } + var frame = bt.frames[self.currentFrame]; var evalFrames = frame.scopes.map(function(s) {