gjdwebserver-overlay/mail-client/geary/files/0020-Application.CertificateManager-Fix-critical-when-no-.patch
Gerben Jan Dijkman 63f719a806 Added files
2021-03-01 15:30:25 +01:00

32 lines
1.3 KiB
Diff

From 7f7c55e79a0ec40ec3fae5c86568e4c1b6cc37df Mon Sep 17 00:00:00 2001
From: Michael Gratton <mike@vee.net>
Date: Fri, 25 Sep 2020 08:25:34 +1000
Subject: [PATCH 020/124] Application.CertificateManager: Fix critical when no
GCR trust stores
Ensure GCR store not null before accessing it.
---
src/client/application/application-certificate-manager.vala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/client/application/application-certificate-manager.vala b/src/client/application/application-certificate-manager.vala
index ff0e7785..d9e40fcd 100644
--- a/src/client/application/application-certificate-manager.vala
+++ b/src/client/application/application-certificate-manager.vala
@@ -74,8 +74,10 @@ public class Application.CertificateManager : GLib.Object {
bool has_rw_store = false;
if (has_uris) {
Gck.Slot? store = Gcr.pkcs11_get_trust_store_slot();
- has_rw_store = !store.has_flags(CKF_WRITE_PROTECTED);
- debug("GCR store is R/W: %s", has_rw_store.to_string());
+ if (store != null) {
+ has_rw_store = !store.has_flags(CKF_WRITE_PROTECTED);
+ debug("GCR store is R/W: %s", has_rw_store.to_string());
+ }
}
return has_rw_store;
--
2.29.2