Possible workaround for crash
This commit is contained in:
@@ -1885,6 +1885,11 @@ void CWallet::ReacceptWalletTransactions()
|
|||||||
|
|
||||||
bool CWalletTx::RelayWalletTransaction()
|
bool CWalletTx::RelayWalletTransaction()
|
||||||
{
|
{
|
||||||
|
if ( pwallet == 0 )
|
||||||
|
{
|
||||||
|
fprintf(stderr,"unexpected null pwallet in RelayWalletTransaction\n");
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
assert(pwallet->GetBroadcastTransactions());
|
assert(pwallet->GetBroadcastTransactions());
|
||||||
if (!IsCoinBase())
|
if (!IsCoinBase())
|
||||||
{
|
{
|
||||||
@@ -2124,9 +2129,13 @@ std::vector<uint256> CWallet::ResendWalletTransactionsBefore(int64_t nTime)
|
|||||||
}
|
}
|
||||||
BOOST_FOREACH(PAIRTYPE(const unsigned int, CWalletTx*)& item, mapSorted)
|
BOOST_FOREACH(PAIRTYPE(const unsigned int, CWalletTx*)& item, mapSorted)
|
||||||
{
|
{
|
||||||
CWalletTx& wtx = *item.second;
|
CWalletTx& wtx;
|
||||||
if (wtx.RelayWalletTransaction())
|
if ( item.second != 0 )
|
||||||
result.push_back(wtx.GetHash());
|
{
|
||||||
|
wtx = *item.second;
|
||||||
|
if (wtx.RelayWalletTransaction())
|
||||||
|
result.push_back(wtx.GetHash());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user