summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-29 11:23:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-29 11:23:30 +0000
commita4082247a4934a7396265e9e4f845e65501bc6d7 (patch)
tree9292b2330d070a134188a15bf5a6dd0431c716ed /plugins/CryptoPP/src
parent25c539d764f65bbb5981fd4d9d169b36ded5ba16 (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@4231 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/src')
-rw-r--r--plugins/CryptoPP/src/cpp_rsam.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/CryptoPP/src/cpp_rsam.cpp b/plugins/CryptoPP/src/cpp_rsam.cpp
index a45cf4d9da..36dacf7e0b 100644
--- a/plugins/CryptoPP/src/cpp_rsam.cpp
+++ b/plugins/CryptoPP/src/cpp_rsam.cpp
@@ -863,18 +863,19 @@ void rsa_alloc( pCNTX ptr ) {
void rsa_free( pCNTX ptr ) {
pRSADATA p = (pRSADATA) ptr->pdata;
- if (p && p->event) {
+ if (p == NULL)
+ return;
+
+ if (p->event) {
p->thread_exit = 2; // отпускаем поток в свободное плавание
SetEvent( p->event );
}
- else {
- delete p->queue;
- delete p;
- ptr->pdata = NULL;
- }
+
+ delete p->queue;
+ delete p;
+ ptr->pdata = NULL;
}
-
void rsa_free_thread( pRSADATA p ) {
if ( p->event ) {
p->thread_exit = 1;