Fix #2766 sourceFile and sourcePath can be `null`

This commit is contained in:
Claudio Bley 2016-10-01 15:12:24 +02:00
parent 0dfd40972d
commit ec27d65fcb
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ private final class DelegatingReporter(warnFatal: Boolean, noWarn: Boolean, priv
val offset = getOffset(pos)
val pointer = offset - src.lineToOffset(src.offsetToLine(offset))
val pointerSpace = ((lineContent: Seq[Char]).take(pointer).map { case '\t' => '\t'; case x => ' ' }).mkString
position(Some(sourcePath), Some(sourceFile), Some(line), lineContent, Some(offset), Some(pointer), Some(pointerSpace))
position(Option(sourcePath), Option(sourceFile), Some(line), lineContent, Some(offset), Some(pointer), Some(pointerSpace))
}
private[this] def getOffset(pos: Position): Int =
{