From e3f0c4f18ab590526f7fbb378bcd96041375c48e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 13 Jul 2013 11:13:02 +0000 Subject: no need to crash freeing an empty event git-svn-id: http://svn.miranda-ng.org/main/trunk@5351 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/modules.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mir_core') 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; -- cgit v1.2.3