I can reproduce an issue with master; v0.17.1rc1 works fine.

Steps to reproduce:
- `bitcoin-qt -regtest`
- open Console window
- repeat `generatetoaddress 1 AN_ADDRESS` some times until crash

Crash occurs both on wayland and x11.

[debug.log](https://github.com/bitcoin/bitcoin/files/2690776/debug.log)

[wallets.zip](https://github.com/bitcoin/bitcoin/files/2690781/wallets.zip)
{
    updateNetworkState();
}
void BitcoinGUI::setNetworkActive(bool networkActive)
{
    updateNetworkState();
}
void BitcoinGUI::updateHeadersSyncProgressLabel()
{
    int64_t headersTipTime = clientModel->getHeaderTipTime();
    int headersTipHeight = clientModel->getHeaderTipHeight();
    int estHeadersLeft = (GetTime() - headersTipTime) / Params().GetConsensus().nPowTargetSpacing;
    if (estHeadersLeft > HEADER_HEIGHT_DELTA_SYNC)
        progressBarLabel->setText(tr("Syncing Headers (%1%)...").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight, 'f', 1)));
}
void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)