Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index ec25acc3a16ae880b58163a9ee5fda93129f8b3e..ea1c0842b99534e1d3c06387403c6298ea0721f6 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -786,9 +786,11 @@ bool Debug::CompileDebuggerScript(int index) { |
"error_loading_debugger", &computed_location, |
Vector<Handle<Object> >::empty(), Handle<String>(), Handle<JSArray>()); |
ASSERT(!isolate->has_pending_exception()); |
- isolate->set_pending_exception(*exception); |
- MessageHandler::ReportMessage(Isolate::Current(), NULL, message); |
- isolate->clear_pending_exception(); |
+ if (!exception.is_null()) { |
+ isolate->set_pending_exception(*exception); |
+ MessageHandler::ReportMessage(Isolate::Current(), NULL, message); |
+ isolate->clear_pending_exception(); |
+ } |
return false; |
} |