aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/settings/SettingsGeneral.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/settings/SettingsGeneral.cpp')
-rw-r--r--src/ui/settings/SettingsGeneral.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/settings/SettingsGeneral.cpp b/src/ui/settings/SettingsGeneral.cpp
index c0e3d75f..9cee3bc8 100644
--- a/src/ui/settings/SettingsGeneral.cpp
+++ b/src/ui/settings/SettingsGeneral.cpp
@@ -109,7 +109,8 @@ GeneralTab::GeneralTab(GpgME::GpgContext *ctx, QWidget *parent)
keyIds.insert("", tr("<none>"));
for (const auto &keyid : *mKeyList->getAllPrivateKeys()) {
- auto &key = mCtx->getKeyById(keyid);
+ auto key = mCtx->getKeyById(keyid);
+ if (!key.good) continue;
keyIds.insert(key.id, key.uids.first().uid);
}
for (const auto &k : keyIds.keys()) {