interfaces: Avoid interface instance if wallet is null

This commit is contained in:
João Barbosa 2019-01-22 15:09:57 +00:00
parent be82dea23c
commit 4c8982a88e

View file

@ -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)
{