From b6e7eee4dfefb70505e29bd22d535ae1fcbed10c Mon Sep 17 00:00:00 2001 From: saturneric Date: Sat, 12 Apr 2025 13:47:01 +0200 Subject: fix: avoid accessing invalid pointers of structs related to gpgme_key --- src/core/model/GpgUID.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/model/GpgUID.cpp') diff --git a/src/core/model/GpgUID.cpp b/src/core/model/GpgUID.cpp index cd4be820..cfc2784f 100644 --- a/src/core/model/GpgUID.cpp +++ b/src/core/model/GpgUID.cpp @@ -32,7 +32,8 @@ namespace GpgFrontend { GpgUID::GpgUID() = default; -GpgUID::GpgUID(gpgme_user_id_t uid) : uid_ref_(uid) {} +GpgUID::GpgUID(QSharedPointer key_ref, gpgme_user_id_t uid) + : key_ref_(std::move(key_ref)), uid_ref_(uid) {} GpgUID::GpgUID(const GpgUID &) = default; -- cgit v1.2.3