From a637734ba22307f6e89857803070f566e736d4a6 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 5 May 2017 00:20:02 +0000 Subject: [PATCH] rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str --- src/wallet/rpcwallet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d1e7485d04224..ea325a26275ef 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -729,7 +729,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)