- Always call EndUserApiHook if BeginIfHookedUserApiHook returned true

svn path=/branches/GSoC_2011/ThemesSupport/; revision=52948
This commit is contained in:
Giannis Adamopoulos 2011-07-28 12:23:42 +00:00
parent 9519ff7b12
commit 4c2f096717

View file

@ -2213,7 +2213,13 @@ DefWindowProcA(HWND hWnd,
Hook = BeginIfHookedUserApiHook();
if (Hook)
{
msgOverride = IsMsgOverride(Msg, &guah.DefWndProcArray);
if(msgOverride == FALSE)
{
EndUserApiHook();
}
}
/* Bypass SEH and go direct. */
if (!Hook || !msgOverride)
@ -2246,7 +2252,13 @@ DefWindowProcW(HWND hWnd,
Hook = BeginIfHookedUserApiHook();
if (Hook)
{
msgOverride = IsMsgOverride(Msg, &guah.DefWndProcArray);
if(msgOverride == FALSE)
{
EndUserApiHook();
}
}
/* Bypass SEH and go direct. */
if (!Hook || !msgOverride)