Prevent crash if Auto-Type performed on new entry

* Check that entry's group is not nullptr
* Fixes #3967
This commit is contained in:
Jonathan White 2020-01-07 18:19:02 -05:00 committed by Janek Bevendorff
parent 62cda9dd40
commit 39a7ce58b9

View File

@ -588,12 +588,12 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
QList<QString> AutoType::autoTypeSequences(const Entry* entry, const QString& windowTitle) QList<QString> AutoType::autoTypeSequences(const Entry* entry, const QString& windowTitle)
{ {
QList<QString> sequenceList; QList<QString> sequenceList;
const Group* group = entry->group();
if (!entry->autoTypeEnabled()) { if (!group || !entry->autoTypeEnabled()) {
return sequenceList; return sequenceList;
} }
const Group* group = entry->group();
do { do {
if (group->autoTypeEnabled() == Group::Disable) { if (group->autoTypeEnabled() == Group::Disable) {
return sequenceList; return sequenceList;