Browse Source

project cannot be null, few lines bewore and next line would throw NPE.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@526485 13f79535-47bb-0310-9956-ffa450edef68
master
Jacobus Martinus Kruithof 18 years ago
parent
commit
1af32c7d51
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/main/org/apache/tools/ant/Main.java

+ 2
- 3
src/main/org/apache/tools/ant/Main.java View File

@@ -799,9 +799,8 @@ public class Main implements AntMain {
BuildListener listener =
(BuildListener) ClasspathUtils.newInstance(className,
Main.class.getClassLoader(), BuildListener.class);
if (project != null) {
project.setProjectReference(listener);
}
project.setProjectReference(listener);

project.addBuildListener(listener);
}
}


Loading…
Cancel
Save