From 38040304ab354164582956b184649af27d8f6635 Mon Sep 17 00:00:00 2001 From: Sunny King Date: Sat, 18 Feb 2012 16:36:06 +0000 Subject: [PATCH] PPCoin: bug fix: malformed coinstake transaction created when balance is 0 introduced with coinstake transaction (71a5b227) --- src/wallet.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/wallet.cpp b/src/wallet.cpp index 8405d16..52d77ac 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1073,6 +1073,8 @@ bool CWallet::CreateCoinStake(CScript scriptPubKey, CTransaction& txNew) int64 nValueIn = 0; if (!SelectCoins(GetBalance(), txNew.nTime, setCoins, nValueIn)) return false; + if (setCoins.empty()) + return false; int64 nCredit = 0; BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins) { -- 1.7.1