Index: compiler/java/com/google/dart/compiler/ast/DartUnit.java |
diff --git a/compiler/java/com/google/dart/compiler/ast/DartUnit.java b/compiler/java/com/google/dart/compiler/ast/DartUnit.java |
index faa2982e1fc27c93ce67e78a998c68341718df51..ff55c06358bcd8c5fcbc9afb75d47be688b35d7f 100644 |
--- a/compiler/java/com/google/dart/compiler/ast/DartUnit.java |
+++ b/compiler/java/com/google/dart/compiler/ast/DartUnit.java |
@@ -147,6 +147,9 @@ public class DartUnit extends DartNode { |
* Answer the receiver's directives or <code>null</code> if none |
*/ |
public List<DartDirective> getDirectives() { |
+ if (directives == null) { |
+ return Collections.<DartDirective> emptyList(); |
+ } |
return directives; |
} |
-} |
+} |