git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
6be6be2
)
Add model null pointer check (solves issue #595 and https://github.com/laanwj/bitcoin...
author
Wladimir J. van der Laan
<laanwj@gmail.com>
Sun, 13 Nov 2011 07:45:29 +0000 (08:45 +0100)
committer
Wladimir J. van der Laan
<laanwj@gmail.com>
Sun, 13 Nov 2011 07:50:58 +0000 (08:50 +0100)
Missed this one before, which can be triggered in race condition if window event arrives before model is set
src/qt/bitcoingui.cpp
patch
|
blob
|
history
diff --git
a/src/qt/bitcoingui.cpp
b/src/qt/bitcoingui.cpp
index
5ae3ce3
..
8641c72
100644
(file)
--- 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();