summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/crypt_dll.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-04-07 19:17:54 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-04-07 19:17:54 +0000
commitaed337ad90f145991a39b7900b8d42dc18178366 (patch)
treeca09e611f0f0fd6f6ba8c83364f548d097e3ab2e /plugins/SecureIM/src/crypt_dll.cpp
parentf19019ce1e932f1c773ca00e87fd64aea6e32430 (diff)
SecureIM:
- Minor Fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12661 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/crypt_dll.cpp')
-rw-r--r--plugins/SecureIM/src/crypt_dll.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/SecureIM/src/crypt_dll.cpp b/plugins/SecureIM/src/crypt_dll.cpp
index 9390367d93..d7c57ea17a 100644
--- a/plugins/SecureIM/src/crypt_dll.cpp
+++ b/plugins/SecureIM/src/crypt_dll.cpp
@@ -187,13 +187,15 @@ BOOL LoadKeyPGP(pUinKey ptr)
int mode = db_get_b(ptr->hContact, MODULENAME, "pgp_mode", 255);
if (mode == 0) {
DBVARIANT dbv;
- db_get(ptr->hContact, MODULENAME, "pgp", &dbv);
- BOOL r = (dbv.type == DBVT_BLOB);
- if (r) pgp_set_keyid(ptr->cntx, (PVOID)dbv.pbVal);
- db_free(&dbv);
- return r;
+ if(!db_get(ptr->hContact, MODULENAME, "pgp", &dbv)) {
+ BOOL r = (dbv.type == DBVT_BLOB);
+ if (r)
+ pgp_set_keyid(ptr->cntx, (PVOID)dbv.pbVal);
+ db_free(&dbv);
+ return r;
+ }
}
- if (mode == 1) {
+ else if (mode == 1) {
LPSTR key = db_get_sa(ptr->hContact, MODULENAME, "pgp");
if (key) {
pgp_set_key(ptr->cntx, key);