summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-13 11:13:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-13 11:13:02 +0000
commite3f0c4f18ab590526f7fbb378bcd96041375c48e (patch)
tree1c7c67a1f7dccd4dd2a03065159deb00a052872b
parentde66faa65debc88f5449104dbe0be27b4290f020 (diff)
no need to crash freeing an empty event
git-svn-id: http://svn.miranda-ng.org/main/trunk@5351 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/mir_core/modules.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mir_core/modules.cpp b/src/mir_core/modules.cpp
index 0644fb3414..853205ba01 100644
--- a/src/mir_core/modules.cpp
+++ b/src/mir_core/modules.cpp
@@ -126,6 +126,9 @@ MIR_CORE_DLL(HANDLE) CreateHookableEvent(const char *name)
MIR_CORE_DLL(int) DestroyHookableEvent(HANDLE hEvent)
{
+ if (hEvent == NULL)
+ return 1;
+
mir_cslock lck(csHooks);
int idx;