fix BuildHandler NPE from previous checkin

This commit is contained in:
zzz
2013-01-28 12:50:04 +00:00
parent 9247dc898c
commit 95d0dc0419
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 6; public final static long BUILD = 7;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";

View File

@ -866,7 +866,7 @@ class BuildHandler implements Runnable {
if (accept) { if (accept) {
// early request throttle check, before queueing and decryption // early request throttle check, before queueing and decryption
Hash fh = fromHash; Hash fh = fromHash;
if (fh == null) if (fh == null && from != null)
fh = from.calculateHash(); fh = from.calculateHash();
if (fh != null && _requestThrottler.shouldThrottle(fh)) { if (fh != null && _requestThrottler.shouldThrottle(fh)) {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))