mirror of
https://github.com/dashpay/dash.git
synced 2024-12-30 22:35:51 +01: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.
This commit is contained in:
parent
c83d4d2170
commit
99add01e76
@ -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];
|
||||||
}
|
}
|
||||||
@ -113,9 +114,12 @@ MacDockIconHandler *MacDockIconHandler::instance()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MacDockIconHandler::handleDockIconClickEvent()
|
void MacDockIconHandler::handleDockIconClickEvent()
|
||||||
|
{
|
||||||
|
if (this->mainWindow)
|
||||||
{
|
{
|
||||||
this->mainWindow->activateWindow();
|
this->mainWindow->activateWindow();
|
||||||
this->mainWindow->show();
|
this->mainWindow->show();
|
||||||
|
}
|
||||||
|
|
||||||
emit this->dockIconClicked();
|
emit this->dockIconClicked();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user