From def2fdb4b9b52fa908c11fe2f5a42ea04f8e9f11 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Tue, 9 Sep 2014 14:01:11 -0400 Subject: [PATCH] Fix crashing bug caused by orphan(s) with duplicate prevout.hash --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index f063a48fe57..27100d62c2a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -498,6 +498,8 @@ void static EraseOrphanTx(uint256 hash) BOOST_FOREACH(const CTxIn& txin, it->second.vin) { map >::iterator itPrev = mapOrphanTransactionsByPrev.find(txin.prevout.hash); + if (itPrev == mapOrphanTransactionsByPrev.end()) + continue; itPrev->second.erase(hash); if (itPrev->second.empty()) mapOrphanTransactionsByPrev.erase(itPrev);