Fix bug that can cause crash.

This commit is contained in:
JoelKatz
2013-05-04 13:14:58 -07:00
parent 8734f209a6
commit a5acb4e69a

View File

@@ -929,7 +929,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();