Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str #10341

Merged
merged 1 commit into from May 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/wallet/rpcwallet.cpp
Expand Up @@ -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)
Expand Down