From 4c8982a88e3d9fae4f8fc147a2d9f9650a493da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Tue, 22 Jan 2019 15:09:57 +0000 Subject: [PATCH] interfaces: Avoid interface instance if wallet is null --- src/interfaces/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index a2cae2a7a..62b057945 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -523,7 +523,7 @@ public: } // namespace -std::unique_ptr MakeWallet(const std::shared_ptr& wallet) { return MakeUnique(wallet); } +std::unique_ptr MakeWallet(const std::shared_ptr& wallet) { return wallet ? MakeUnique(wallet) : nullptr; } std::unique_ptr MakeWalletClient(Chain& chain, std::vector wallet_filenames) {