Commit 1d79e686 authored by Wladimir J. van der Laan's avatar Wladimir J. van der Laan
Browse files

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
parent cb7e4bc8
Showing with 3 additions and 3 deletions
+3 -3
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment