| Index: compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java
|
| diff --git a/compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java b/compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java
|
| index f38dde89ece35840a47ac01af35a958484903fc2..bbf38517f972c044c5efff6a1a1b873aab3945a4 100644
|
| --- a/compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java
|
| +++ b/compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java
|
| @@ -4,6 +4,7 @@
|
|
|
| package com.google.dart.compiler;
|
|
|
| +import com.google.common.base.Objects;
|
| import com.google.dart.compiler.CompilerConfiguration.ErrorFormat;
|
|
|
| import java.io.PrintStream;
|
| @@ -42,7 +43,7 @@ public class DefaultErrorFormatter implements ErrorFormatter {
|
| String includeFrom = "";
|
| if (sourceFile instanceof DartSource) {
|
| LibrarySource lib = ((DartSource) sourceFile).getLibrary();
|
| - if (!sourceFile.getUri().equals(lib.getUri())) {
|
| + if (lib != null && !Objects.equal(sourceFile.getUri(), lib.getUri())) {
|
| includeFrom = " (sourced from " + lib.getUri() + ")";
|
| }
|
| }
|
|
|