Skip to content

Commit c6f4b0d

Browse files
committed
gui: crash fix, do not consume numBlocksChanged() events during shutdown
Attempting to update views during shutdown can crash the app due to accessing backend models that may no longer exist. The shutdown procedure begins by unsetting clientModel from all views. Therefore, it’s safe to ignore events when clientModel is nullptr.
1 parent 0dc74c9 commit c6f4b0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ void SendCoinsDialog::updateCoinControlState()
855855
}
856856

857857
void SendCoinsDialog::updateNumberOfBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, SyncType synctype, SynchronizationState sync_state) {
858-
if (sync_state == SynchronizationState::POST_INIT) {
858+
if (sync_state == SynchronizationState::POST_INIT && clientModel) {
859859
updateSmartFeeLabel();
860860
}
861861
}

0 commit comments

Comments
 (0)