Index: pkg/compiler/lib/src/compiler.dart |
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
index e6d214c4ddf9faabf7493a9c3303b6eab1439a1f..9ed9c8c06469ae66c640562515b544587da42176 100644 |
--- a/pkg/compiler/lib/src/compiler.dart |
+++ b/pkg/compiler/lib/src/compiler.dart |
@@ -1956,6 +1956,10 @@ abstract class Compiler implements DiagnosticListener { |
if (element == null) { |
element = currentElement; |
} |
+ if (element == null) { |
+ return null; |
+ } |
+ |
if (element.sourcePosition != null) { |
return element.sourcePosition; |
} |