mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-15 23:10:59 -04:00
More careful null checking and member initalization.
This commit is contained in:
parent
54bb7462f6
commit
b9370c6e79
12 changed files with 32 additions and 26 deletions
|
@ -226,7 +226,9 @@ void MainWindow::updateCopyAttributesMenu()
|
|||
if (!dbWidget) {
|
||||
return;
|
||||
}
|
||||
if (!dbWidget->entryView()->isSingleEntrySelected()) {
|
||||
|
||||
Entry* entry = dbWidget->entryView()->currentEntry();
|
||||
if (!entry || !dbWidget->entryView()->isSingleEntrySelected()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -235,8 +237,6 @@ void MainWindow::updateCopyAttributesMenu()
|
|||
delete actions[i];
|
||||
}
|
||||
|
||||
Entry* entry = dbWidget->entryView()->currentEntry();
|
||||
|
||||
Q_FOREACH (const QString& key, entry->attributes()->customKeys()) {
|
||||
QAction* action = m_ui->menuEntryCopyAttribute->addAction(key);
|
||||
m_copyAdditionalAttributeActions->addAction(action);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue