mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-23 15:00:47 -04:00
Fix crash on screen lock or computer sleep
* Fixes #10455 * Fixes #10432 * Fixes #10415 Prevent setting critical key components to nullptr when database data is cleared. This can result in a crash due to race condition between threads. Added a bunch of asserts to detect this problem and if guards to prevent actual crashes.
This commit is contained in:
parent
3b8dc028c1
commit
a8b60b7b02
5 changed files with 44 additions and 25 deletions
|
@ -270,9 +270,7 @@ void DatabaseOpenWidget::clearForms()
|
|||
m_ui->hardwareKeyCombo->clear();
|
||||
toggleQuickUnlockScreen();
|
||||
|
||||
QString error;
|
||||
m_db.reset(new Database());
|
||||
m_db->open(m_filename, nullptr, &error);
|
||||
m_db.reset(new Database(m_filename));
|
||||
}
|
||||
|
||||
QSharedPointer<Database> DatabaseOpenWidget::database()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue