[or-cvs] [ernie/master 2/2] Fix NullPointerExceptions in certain configurations.
karsten at torproject.org
karsten at torproject.org
Wed Apr 14 20:56:03 UTC 2010
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Wed, 14 Apr 2010 22:55:39 +0200
Subject: Fix NullPointerExceptions in certain configurations.
Commit: a0943a8dda5c9d8ade68ee0df6168047f09ab365
---
src/Main.java | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/Main.java b/src/Main.java
index b7c636b..7be5643 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -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");
+ }
}
}
--
1.6.5
More information about the tor-commits
mailing list