diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/Global.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 8444065004..df26a832c7 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -84,7 +84,13 @@ self => if (typerRun == currentTyperRun) return - integrateNew() + // @Martin + // Guard against NPEs in integrateNew if context.unit == null here. + // But why are we doing this at all? If it was non-null previously + // integrateNew will already have been called. If it was null previously + // it will still be null now? + if (context.unit != null) + integrateNew() throw new FreshRunReq } catch { case ex : ValidateError => // Ignore, this will have been reported elsewhere |