Index: pkg/compiler/lib/src/js_backend/runtime_types.dart |
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart |
index 369cec030ffccaeb63f61330dd7bb67e8c4590ee..570ea1c9ba382418e5a56cf750b3d827ac5baa1a 100644 |
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart |
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart |
@@ -150,7 +150,7 @@ class _RuntimeTypes implements RuntimeTypes { |
@override |
void registerRtiDependency(Element element, Element dependency) { |
// We're not dealing with typedef for now. |
- if (!element.isClass || !dependency.isClass) return; |
+ if (element == null || !element.isClass || !dependency.isClass) return; |
Set<ClassElement> classes = |
rtiDependencies.putIfAbsent(element, () => new Set<ClassElement>()); |
classes.add(dependency); |