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)
createTrayIcon(networkStyle);
    }
    
    statusBar();
    
    statusBar()->setSizeGripEnabled(false);
    
    QFrame *frameBlocks = new QFrame();
    frameBlocks->setContentsMargins(0,0,0,0);
    frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
    frameBlocksLayout->setContentsMargins(3,0,3,0);
    frameBlocksLayout->setSpacing(3);
    unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle);
    labelWalletEncryptionIcon = new QLabel();
    labelWalletHDStatusIcon = new QLabel();
    labelProxyIcon = new GUIUtil::ClickableLabel();
    connectionsControl = new GUIUtil::ClickableLabel();
    labelBlocksIcon = new GUIUtil::ClickableLabel();
    if(enableWallet)
    {
        frameBlocksLayout->addStretch();
        frameBlocksLayout->addWidget(unitDisplayControl);
        frameBlocksLayout->addStretch();
        frameBlocksLayout->addWidget(labelWalletEncryptionIcon);
        frameBlocksLayout->addWidget(labelWalletHDStatusIcon);
    }
    frameBlocksLayout->addWidget(labelProxyIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(connectionsControl);