Skip to content

Commit

Permalink
[backport#15153] Interfaces: Avoid interface instance if wallet is null
Browse files Browse the repository at this point in the history
Summary:
bitcoin/bitcoin@4c8982a

---

Depends on D6119

This is a partial backport of Core [[bitcoin/bitcoin#15153 | PR15153]]

Test Plan:
  ninja check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6121
  • Loading branch information
promag authored and majcosta committed May 19, 2020
1 parent 7067439 commit e616c35
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 @@ -521,7 +521,7 @@ namespace {
} // namespace

std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet> &wallet) {
return std::make_unique<WalletImpl>(wallet);
return wallet ? std::make_unique<WalletImpl>(wallet) : nullptr;
}

std::unique_ptr<ChainClient>
Expand Down

0 comments on commit e616c35

Please sign in to comment.