mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-20 12:00:52 +00:00
Add model null pointer check (solves issue #595 and https://github.com/laanwj/bitcoin-qt/issues/29)
Missed this one before, which can be triggered in race condition if window event arrives before model is set
This commit is contained in:
parent
6be6be2ed9
commit
405ce5a876
@ -478,11 +478,11 @@ void BitcoinGUI::error(const QString &title, const QString &message)
|
||||
void BitcoinGUI::changeEvent(QEvent *e)
|
||||
{
|
||||
#ifndef Q_WS_MAC // Ignored on Mac
|
||||
if (e->type() == QEvent::WindowStateChange)
|
||||
if(e->type() == QEvent::WindowStateChange)
|
||||
{
|
||||
if (clientModel->getOptionsModel()->getMinimizeToTray())
|
||||
if(clientModel && clientModel->getOptionsModel()->getMinimizeToTray())
|
||||
{
|
||||
if (isMinimized())
|
||||
if(isMinimized())
|
||||
{
|
||||
hide();
|
||||
e->ignore();
|
||||
|
Loading…
x
Reference in New Issue
Block a user