summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities.cpp')
-rw-r--r--utilities.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utilities.cpp b/utilities.cpp
index 6f5a654..fb522b6 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -486,8 +486,13 @@ void AddHandlers()
bool isContactSecured(HANDLE hContact)
{
- if(DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0))
+ TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T(""));
+ if(DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0) && (_tcslen(key) > 1))
+ {
+ mir_free(key);
return true;
+ }
+ mir_free(key);
return false;
}