Fix NullPointerExceptions in certain configurations.

This commit is contained in:
Karsten Loesing 2010-04-14 22:55:39 +02:00
parent 4681ef862e
commit a0943a8dda

View File

@ -84,21 +84,27 @@ public class Main {
if (config.getImportCachedRelayDescriptors()) {
new CachedRelayDescriptorReader(rdp,
config.getCachedRelayDescriptorDirectory());
aw.intermediateStats("importing relay descriptors from local Tor "
+ "data directories");
if (aw != null) {
aw.intermediateStats("importing relay descriptors from local "
+ "Tor data directories");
}
}
if (config.getImportDirectoryArchives()) {
new ArchiveReader(rdp, config.getDirectoryArchivesDirectory(),
config.getKeepDirectoryArchiveImportHistory());
aw.intermediateStats("importing relay descriptors from local "
+ "directory");
if (aw != null) {
aw.intermediateStats("importing relay descriptors from local "
+ "directory");
}
}
if (rdd != null) {
rdd.downloadMissingDescriptors();
rdd.writeFile();
rdd = null;
aw.intermediateStats("downloading relay descriptors from the "
+ "directory authorities");
if (aw != null) {
aw.intermediateStats("downloading relay descriptors from the "
+ "directory authorities");
}
}
}