Skip to content

Commit

Permalink
interfaces: Avoid interface instance if wallet is null
Browse files Browse the repository at this point in the history
  • Loading branch information
promag committed Feb 4, 2019
1 parent be82dea commit 4c8982a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interfaces/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ class WalletClientImpl : public ChainClient

} // 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)
{
Expand Down

0 comments on commit 4c8982a

Please sign in to comment.