summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-16 20:31:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-16 20:31:39 +0000
commit91cccbcb4d7cade5702b59b36c0c66a02dea73d7 (patch)
tree21eaf63f1dc77ad2ff279687f3c1aeb3837177c5 /src/mir_core
parent7a18e9f478a5f0baa7df3634fb72957965223148 (diff)
minor optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@8642 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/modules.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mir_core/modules.cpp b/src/mir_core/modules.cpp
index 6899a2dbf3..ae122eb0f3 100644
--- a/src/mir_core/modules.cpp
+++ b/src/mir_core/modules.cpp
@@ -563,7 +563,10 @@ MIR_CORE_DLL(INT_PTR) CallServiceSync(const char *name, WPARAM wParam, LPARAM lP
MIR_CORE_DLL(int) CallFunctionAsync(void (__stdcall *func)(void *), void *arg)
{
- QueueMainThread((PAPCFUNC)func, arg, 0);
+ if (GetCurrentThreadId() == mainThreadId)
+ func(arg);
+ else
+ QueueMainThread((PAPCFUNC)func, arg, 0);
return 0;
}