diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-26 17:44:57 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-26 17:59:57 +0200 |
commit | f30801afbde7598318a5b03de9812c58a6a34f33 (patch) | |
tree | 1ee49ad1deb3a7a597de190bc31bddd898c9f302 /src/qt/bitcoingui.cpp | |
parent | d49b0876a4f4e5f8d7763fd2192f1efd0ddeec1e (diff) |
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/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 7 |
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(); + } } } |