aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-08-26 17:44:57 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-08-26 17:59:57 +0200
commitf30801afbde7598318a5b03de9812c58a6a34f33 (patch)
tree1ee49ad1deb3a7a597de190bc31bddd898c9f302 /src
parentd49b0876a4f4e5f8d7763fd2192f1efd0ddeec1e (diff)
downloadbitcoin-f30801afbde7598318a5b03de9812c58a6a34f33.tar.xz
qt: Add null check in setClientModel(0)
Don't clear tray icon menu if it was never created. Necessary precaution after #4649.
Diffstat (limited to 'src')
-rw-r--r--src/qt/bitcoingui.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 68d42ce64b..790301a1eb 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -455,8 +455,11 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
} else {
// Disable possibility to show main window via action
toggleHideAction->setEnabled(false);
- // Disable context menu on tray icon
- trayIconMenu->clear();
+ if(trayIconMenu)
+ {
+ // Disable context menu on tray icon
+ trayIconMenu->clear();
+ }
}
}