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