Avoid early call to loadwallet crashing bitcoin-qt. Meant to fix #16937.
gui: only call getOrCreateWallet if wallet interface pointer not null #16955
pull icota wants to merge 1 commits into bitcoin:master from icota:qt-loadwallet-crash changing 1 files +1 −1-
icota commented at 2:47 PM on September 24, 2019: contributor
-
db31bcb475
gui: only call getOrCreateWallet if wallet interface pointer not null
Avoids early call to loadwallet crashing bitcoin-qt (https://github.com/bitcoin/bitcoin/issues/16937)
-
in src/qt/walletcontroller.cpp:34 in db31bcb475
30 | @@ -31,7 +31,7 @@ WalletController::WalletController(interfaces::Node& node, const PlatformStyle* 31 | , m_options_model(options_model) 32 | { 33 | m_handler_load_wallet = m_node.handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) { 34 | - getOrCreateWallet(std::move(wallet)); 35 | + if (wallet) getOrCreateWallet(std::move(wallet));
promag commented at 2:58 PM on September 24, 2019:In what case
walletis null?
emilengler commented at 7:48 PM on September 24, 2019:See line 95 in
qt/walletcontroller.cppThere it checks if the wallet is empty even though it isn't null (I think).
promag commented at 9:31 AM on September 25, 2019:This fix is incorrect.
icota commented at 12:12 PM on September 25, 2019:Okay. Care to elaborate?
DrahtBot added the label GUI on Sep 24, 2019icota closed this on Sep 25, 2019DrahtBot locked this on Dec 16, 2021ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 21:14 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 21:14 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me