Fix bug that can cause crash.

This commit is contained in:
JoelKatz
2013-05-04 13:14:58 -07:00
parent e877caa725
commit 7ac7023f12

View File

@@ -901,7 +901,8 @@ void LedgerAcquireMaster::gotLedgerData(Job&, uint256 hash,
if (!ledger)
{
cLog(lsTRACE) << "Got data for ledger we're not acquiring";
peer->punishPeer(LT_InvalidRequest);
if (peer)
peer->punishPeer(LT_InvalidRequest);
return;
}
ledger->noAwaitData();