More careful null checking and member initalization.

This commit is contained in:
Felix Geyer 2014-03-22 12:07:06 +01:00
parent 54bb7462f6
commit b9370c6e79
12 changed files with 32 additions and 26 deletions

View file

@ -591,12 +591,24 @@ void DatabaseWidget::entryActivationSignalReceived(Entry* entry, EntryModel::Mod
void DatabaseWidget::switchToEntryEdit()
{
switchToEntryEdit(m_entryView->currentEntry(), false);
Entry* entry = m_entryView->currentEntry();
Q_ASSERT(entry);
if (!entry) {
return;
}
switchToEntryEdit(entry, false);
}
void DatabaseWidget::switchToGroupEdit()
{
switchToGroupEdit(m_groupView->currentGroup(), false);
Group* group = m_groupView->currentGroup();
Q_ASSERT(group);
if (!group) {
return;
}
switchToGroupEdit(group, false);
}
void DatabaseWidget::switchToMasterKeyChange()