Fix crash when trying to close database during unlock
* Fix #7239 - prevent closing the database widget if the open dialog is still unlocking the database. This problem became slightly worse with quick unlock. With this fix, if the user tries to close the database during unlock we will just ignore that request.
This commit is contained in:
@@ -1565,12 +1565,12 @@ Group* DatabaseWidget::currentGroup() const
|
||||
|
||||
void DatabaseWidget::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
if (!isLocked() && !lock()) {
|
||||
if (!lock() || m_databaseOpenWidget->unlockingDatabase()) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
m_databaseOpenWidget->resetQuickUnlock();
|
||||
|
||||
m_databaseOpenWidget->resetQuickUnlock();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user