diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-11-13 08:45:29 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-11-13 08:50:58 +0100 |
commit | 405ce5a876f96a4fbd136129269df0edeb4c7a55 (patch) | |
tree | 9bc8896d0fece8bd694a6730d66e64a4e984ab13 /src | |
parent | 6be6be2ed9d5d4b9dc1657d434a7fed3b3935f6f (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoingui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 5ae3ce33e8..8641c723b0 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -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(); |