aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-05-22 16:18:07 +0100
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-05-22 16:56:20 +0100
commit80b4910f7d87983f50047074c3c2397b0a5c4e92 (patch)
tree0bd471d1bc9b659b52033bd333cfe9b433e9b4e1 /src/rpc/rawtransaction.cpp
parent6916024768ec57a00f54224640ab4e4871d2a30a (diff)
wallet: Use shared pointer to retain wallet instance
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r--src/rpc/rawtransaction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index c5185ca599..ad2d55afe7 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -988,7 +988,8 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
UniValue signrawtransaction(const JSONRPCRequest& request)
{
#ifdef ENABLE_WALLET
- CWallet * const pwallet = GetWalletForJSONRPCRequest(request);
+ std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
+ CWallet* const pwallet = wallet.get();
#endif
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)