Author: toad
Date: 2008-02-07 00:12:33 +0000 (Thu, 07 Feb 2008)
New Revision: 17634
Modified:
trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
Log:
Don't NPE when byte counter is null.
Modified: trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
===================================================================
--- trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java 2008-02-07
00:05:58 UTC (rev 17633)
+++ trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java 2008-02-07
00:12:33 UTC (rev 17634)
@@ -102,7 +102,7 @@
int totalPackets;
try {
_destination.sendAsync(DMT.createPacketTransmit(_uid, packetNo, _sentPackets,
_prb.getPacket(packetNo)), null, PACKET_SIZE, _ctr);
- _ctr.sentPayload(PACKET_SIZE);
+ if(_ctr != null)
_ctr.sentPayload(PACKET_SIZE);
totalPackets=_prb.getNumPackets();
} catch (NotConnectedException e) {
Logger.normal(this,
"Terminating send: "+e);