aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-06-05 09:26:10 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-06-05 09:26:10 -0700
commit83f9b58f15387821d8a63e3d42d33f26cba6e712 (patch)
treedf9caf7e16a681d3ed610c8f83b7186e0fe2bb9b
parentc83d4d2170bf00863bd5c21c6eaea91b00390e72 (diff)
parent99add01e76657ab7bc09d99c970b3ee08a0c9013 (diff)
Merge pull request #2741 from theuni/fix-osx-dock
osx: fix bitcoin-qt startup crash when clicking dock icon
-rw-r--r--src/qt/macdockiconhandler.mm8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm
index 53b49c42e6..8f826941b2 100644
--- a/src/qt/macdockiconhandler.mm
+++ b/src/qt/macdockiconhandler.mm
@@ -51,6 +51,7 @@ MacDockIconHandler::MacDockIconHandler() : QObject()
this->m_dockIconClickEventHandler = [[DockIconClickEventHandler alloc] initWithDockIconHandler:this];
this->m_dummyWidget = new QWidget();
this->m_dockMenu = new QMenu(this->m_dummyWidget);
+ this->setMainWindow(NULL);
[pool release];
}
@@ -114,8 +115,11 @@ MacDockIconHandler *MacDockIconHandler::instance()
void MacDockIconHandler::handleDockIconClickEvent()
{
- this->mainWindow->activateWindow();
- this->mainWindow->show();
+ if (this->mainWindow)
+ {
+ this->mainWindow->activateWindow();
+ this->mainWindow->show();
+ }
emit this->dockIconClicked();
}