From 0d1dd29b19a3f4459b036bd63f03c518e000d71f Mon Sep 17 00:00:00 2001 From: CH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com> Date: Sat, 29 Aug 2020 13:37:51 +0530 Subject: Small Fixes --- src/ui/UserProfile.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ui') diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp index 48a3ffa3..59be3464 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp @@ -161,16 +161,17 @@ UserProfile::fetchDeviceList(const QString &userID) for (auto sign_key : luk.value().keys) { // checking if the signatures are empty as "at" could // cause exceptions - if (!mk.value().signatures.empty()) { - auto signs = - mk.value().signatures.at(local_user_id); + auto signs = mk->signatures; + if (!signs.empty() && + signs.find(local_user_id) != signs.end()) { + auto sign = signs.at(local_user_id); try { isUserVerified = isUserVerified || (olm::client()->ed25519_verify_sig( sign_key.second, json(mk.value()), - signs.at(sign_key.first))); + sign.at(sign_key.first))); } catch (std::out_of_range) { isUserVerified = isUserVerified || false; -- cgit 1.5.1