diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/InterpreterLoop.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/InterpreterLoop.scala b/src/compiler/scala/tools/nsc/InterpreterLoop.scala index 82b32fe219..0b344b3329 100644 --- a/src/compiler/scala/tools/nsc/InterpreterLoop.scala +++ b/src/compiler/scala/tools/nsc/InterpreterLoop.scala @@ -118,7 +118,9 @@ class InterpreterLoop(in0: Option[BufferedReader], protected val out: PrintWrite } ignoring(classOf[Exception]) { SignalManager("INT") = { - if (interpreter.lineManager.running) + if (interpreter == null) + onExit() + else if (interpreter.lineManager.running) interpreter.lineManager.cancel() else if (in.currentLine != "") { // non-empty buffer, so make them hit ctrl-C a second time |