| Index: compiler/java/com/google/dart/compiler/ast/LibraryUnit.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/LibraryUnit.java b/compiler/java/com/google/dart/compiler/ast/LibraryUnit.java
|
| index a9c0eab9bff18cab14fd8a06069eade87aed9357..d5e7feb4594a13c507d0dd5c6da6bb01414d999b 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/LibraryUnit.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/LibraryUnit.java
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -111,9 +111,11 @@ public class LibraryUnit {
|
| }
|
|
|
| public void addImport(LibraryUnit unit, LibraryNode node) {
|
| - imports.add(unit);
|
| - if (node != null && node.getPrefix() != null) {
|
| - prefixes.put(unit, node.getPrefix());
|
| + if (unit != null) {
|
| + imports.add(unit);
|
| + if (node != null && node.getPrefix() != null) {
|
| + prefixes.put(unit, node.getPrefix());
|
| + }
|
| }
|
| }
|
|
|
|
|