mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Restore the default message handler on application shutdown. Fixes sporadic segfaults on exit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24599 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e5caf93e23
commit
446eda80c9
3 changed files with 426 additions and 430 deletions
|
@ -102,6 +102,7 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
|||
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
|
||||
connect(ui.action_Help, SIGNAL(triggered()), this, SLOT(help()));
|
||||
connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(configDialog()));
|
||||
connect(ui.actionE_xit, SIGNAL(triggered()), this, SLOT(shutdown()));
|
||||
connect(ui.buttonChangeDevice, SIGNAL(clicked()), this, SLOT(configDialog()));
|
||||
connect(ui.buttonRockbox, SIGNAL(clicked()), this, SLOT(installBtn()));
|
||||
connect(ui.buttonBootloader, SIGNAL(clicked()), this, SLOT(installBootloaderBtn()));
|
||||
|
@ -142,6 +143,16 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
|||
}
|
||||
|
||||
|
||||
void RbUtilQt::shutdown(void)
|
||||
{
|
||||
// restore default message handler to prevent trace accesses during
|
||||
// object destruction -- the trace object could already be destroyed.
|
||||
// Fixes segfaults on exit.
|
||||
qInstallMsgHandler(0);
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void RbUtilQt::trace(void)
|
||||
{
|
||||
SysTrace wnd(this);
|
||||
|
|
|
@ -64,6 +64,7 @@ class RbUtilQt : public QMainWindow
|
|||
bool m_auto;
|
||||
|
||||
private slots:
|
||||
void shutdown(void);
|
||||
void about(void);
|
||||
void help(void);
|
||||
void sysinfo(void);
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue