DINPUT: Enforce single mouse acquire
Alex Villacís Lasso
a_villacis at palosanto.com
Wed Jan 25 16:55:34 CST 2006
Dmitry Timoshkov wrote:
> On Wed, 2006-01-25 at 17:32 -0500, Alex Villacís Lasso wrote:
>
>
>> + if (This == NULL) {
>> + ERR("mouse hook called with no current lock!\n");
>> + return 0;
>> + }
>> +
>> if (code != HC_ACTION) return CallNextHookEx( This->hook, code,
>>
> wparam, lparam );
>
> You need to call CallNextHookEx in any case, otherwise it might break
> other hooks in the chain. Probably just add a check for This being NULL
> in the same place as the code checks for HC_ACTION.
>
>
The problem is that if (This == NULL), then This->hook cannot be
evaluated (for CallNextHookEx) without generating a segmentation fault.
This is the very situation the patch is trying to prevent.
Alex Villacís Lasso
More information about the wine-devel
mailing list