diff options
| author | Luke Dashjr <[email protected]> | 2017-05-05 00:20:02 +0000 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2017-05-05 00:21:00 +0000 |
| commit | a637734ba22307f6e89857803070f566e736d4a6 (patch) | |
| tree | a3c249699174d84fa411f1ffd1b99791ea80951c /src/wallet/rpcwallet.cpp | |
| parent | [wallet] Remove unneeded legacy getbalance code (diff) | |
| download | discoin-a637734ba22307f6e89857803070f566e736d4a6.tar.xz discoin-a637734ba22307f6e89857803070f566e736d4a6.zip | |
rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
| -rw-r--r-- | src/wallet/rpcwallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d1e7485d0..ea325a262 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) |