Index: pkg/kernel/lib/text/ast_to_text.dart |
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart |
index 8fa2c67d26984ca5cb5b9f05713201a24da73905..42312c826f673e54065f19abd47234cc9c65327c 100644 |
--- a/pkg/kernel/lib/text/ast_to_text.dart |
+++ b/pkg/kernel/lib/text/ast_to_text.dart |
@@ -37,11 +37,15 @@ class Disambiguator<T> { |
NameSystem globalDebuggingNames = new NameSystem(); |
String debugLibraryName(Library node) { |
- return node.name ?? globalDebuggingNames.nameLibrary(node); |
+ return node == null |
+ ? 'null' |
+ : node.name ?? globalDebuggingNames.nameLibrary(node); |
} |
String debugClassName(Class node) { |
- return node.name ?? globalDebuggingNames.nameClass(node); |
+ return node == null |
+ ? 'null' |
+ : node.name ?? globalDebuggingNames.nameClass(node); |
} |
String debugQualifiedClassName(Class node) { |