HomePhabricator

gui: Defer removeAndDeleteWallet when no modal widget is active

Description

gui: Defer removeAndDeleteWallet when no modal widget is active

Summary: Backport of core PR15614.

Test Plan:

ninja check check-functional

./src/qt/bitcoin-qt -regtest -server -wallet=w1 &
./src/bitcoin-cli -regtest generate 1 # Get out of IBD if needed

Open the "Parameters=>Encrypt wallet" window and leave it open.

./src/bitcoin-cli -regtest unloadwallet=w1

Before this patch, the GUI crashes. After this patch, the GUI does
nothing, and closing the "Encrypt wallet" window does trigger the wallet
unloading.

Reviewers: #bitcoin_abc, nakihito

Reviewed By: nakihito

Differential Revision: https://reviews.bitcoinabc.org/D5086

Details

Provenance
João Barbosa <joao.paulo.barbosa@gmail.com>Authored on Mar 17 2019, 17:54
FabienCommitted on Jan 28 2020, 20:47
FabienPushed on Jan 28 2020, 20:47
Reviewer
nakihito
Differential Revision
D5086: gui: Defer removeAndDeleteWallet when no modal widget is active
Parents
rABCb6affe11ba28: wallet: Releases dangling files on BerkeleyEnvironment::Close
Branches
Unknown
Tags
Unknown