aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-01-22 15:09:57 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-04 12:20:42 +0000
commit4c8982a88e3d9fae4f8fc147a2d9f9650a493da7 (patch)
treebe7846f1c9cc9e55ff665ed9acfccdac3f14121d
parentbe82dea23c3e6931f9ae7ab8c6a8595ae950587f (diff)
interfaces: Avoid interface instance if wallet is null
-rw-r--r--src/interfaces/wallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index a2cae2a7a7..62b0579456 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -523,7 +523,7 @@ public:
} // namespace
-std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return MakeUnique<WalletImpl>(wallet); }
+std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return wallet ? MakeUnique<WalletImpl>(wallet) : nullptr; }
std::unique_ptr<ChainClient> MakeWalletClient(Chain& chain, std::vector<std::string> wallet_filenames)
{