aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-05-11 19:09:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-05-11 19:19:30 +0200
commit18c9debe602db71712b48b1c6fc521270109b53d (patch)
tree82b90577ed67cea62b243dab7352cf7343ba8de8 /src/wallet/rpcwallet.cpp
parent79aeff6e08f3caa4126c39a0571b370396bc9e91 (diff)
parenta637734ba22307f6e89857803070f566e736d4a6 (diff)
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
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 5c73ed7391..fa67964ce8 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -730,7 +730,8 @@ UniValue getbalance(const JSONRPCRequest& request)
if (request.params.size() == 0)
return ValueFromAmount(pwallet->GetBalance());
- const std::string* account = request.params[0].get_str() != "*" ? &request.params[0].get_str() : nullptr;
+ const std::string& account_param = request.params[0].get_str();
+ const std::string* account = account_param != "*" ? &account_param : nullptr;
int nMinDepth = 1;
if (request.params.size() > 1)