Merge pull request #2741 from theuni/fix-osx-dock
osx: fix bitcoin-qt startup crash when clicking dock icon
This commit is contained in:
commit
83f9b58f15
@ -51,6 +51,7 @@ MacDockIconHandler::MacDockIconHandler() : QObject()
|
|||||||
this->m_dockIconClickEventHandler = [[DockIconClickEventHandler alloc] initWithDockIconHandler:this];
|
this->m_dockIconClickEventHandler = [[DockIconClickEventHandler alloc] initWithDockIconHandler:this];
|
||||||
this->m_dummyWidget = new QWidget();
|
this->m_dummyWidget = new QWidget();
|
||||||
this->m_dockMenu = new QMenu(this->m_dummyWidget);
|
this->m_dockMenu = new QMenu(this->m_dummyWidget);
|
||||||
|
this->setMainWindow(NULL);
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
@ -114,8 +115,11 @@ MacDockIconHandler *MacDockIconHandler::instance()
|
|||||||
|
|
||||||
void MacDockIconHandler::handleDockIconClickEvent()
|
void MacDockIconHandler::handleDockIconClickEvent()
|
||||||
{
|
{
|
||||||
this->mainWindow->activateWindow();
|
if (this->mainWindow)
|
||||||
this->mainWindow->show();
|
{
|
||||||
|
this->mainWindow->activateWindow();
|
||||||
|
this->mainWindow->show();
|
||||||
|
}
|
||||||
|
|
||||||
emit this->dockIconClicked();
|
emit this->dockIconClicked();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user