diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-07 20:03:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-07 20:03:44 +0300 |
commit | f193645f4db83e94bd44dde17f89282f182c00e4 (patch) | |
tree | 3883a76d1ab3ddbacc5dc0b0ece1b444bfd74d1d /plugins | |
parent | a4ecd3ac4b80c77d11f7af8e75983459a5a5fbfd (diff) |
crash fix
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 2985a09b1f..ac9cbdbba8 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -271,10 +271,11 @@ int onProtoAck(WPARAM, LPARAM l) case ACKRESULT_DENIED: case ACKRESULT_FAILED: break; case ACKRESULT_SUCCESS: - { - if(!ack->hProcess) - break; + if (ack->hProcess) { PROTOFILETRANSFERSTATUS *f = (PROTOFILETRANSFERSTATUS*)ack->hProcess; + if (f == NULL) + break; + if ((f->flags & PFTS_SENDING) != PFTS_SENDING) { wchar_t *filename = NULL; if (f->flags & PFTS_UNICODE) { @@ -289,8 +290,8 @@ int onProtoAck(WPARAM, LPARAM l) if (!filename) return 0; } - if (wcsstr(filename, L".gpg")) //decrypt it - { //process encrypted file + if (wcsstr(filename, L".gpg")) { //decrypt it + //process encrypted file if (!bFileTransfers && !bSameAction) { void ShowEncryptedFileMsgBox(); ShowEncryptedFileMsgBox(); |