Skip to content

Commit 18c9deb

Browse files
committed
Merge #10341: rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str
a637734 rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str (Luke Dashjr) Tree-SHA512: 8f03f1d301f714f700bf64e259a1c986136fd1ac532f091aa97198a39c131290c320094f4fc38c774c8db4469a75437596b1d933300e4f04037abc158a252bad
2 parents 79aeff6 + a637734 commit 18c9deb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,8 @@ UniValue getbalance(const JSONRPCRequest& request)
730730
if (request.params.size() == 0)
731731
return ValueFromAmount(pwallet->GetBalance());
732732

733-
const std::string* account = request.params[0].get_str() != "*" ? &request.params[0].get_str() : nullptr;
733+
const std::string& account_param = request.params[0].get_str();
734+
const std::string* account = account_param != "*" ? &account_param : nullptr;
734735

735736
int nMinDepth = 1;
736737
if (request.params.size() > 1)

0 commit comments

Comments
 (0)