mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-19 20:09:26 +00:00
osx: fix bitcoin-qt startup crash when clicking dock icon
Crash probably introduced by 4d17a1b0. Inialize the window to NULL and verify it before use. Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
This commit is contained in:
parent
99f73bd2fd
commit
068996daa5
@ -52,6 +52,8 @@ MacDockIconHandler::MacDockIconHandler() : QObject()
|
||||
this->m_dummyWidget = new QWidget();
|
||||
this->m_dockMenu = new QMenu(this->m_dummyWidget);
|
||||
qt_mac_set_dock_menu(this->m_dockMenu);
|
||||
this->setMainWindow(NULL);
|
||||
|
||||
[pool release];
|
||||
}
|
||||
|
||||
@ -100,8 +102,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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user