Commit 7973e137 authored by Alexandre Julliard's avatar Alexandre Julliard Committed by Michael Stefaniuc

dinput: Add error check to silence a compiler warning.

Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org> (cherry picked from commit 6925fb0b) Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org>
parent d76718e4
......@@ -298,10 +298,11 @@ static void assign_action(HWND dialog)
int obj = lv_get_cur_item(dialog);
int old_action = lv_get_item_data(dialog, obj);
int used_obj;
DIDEVICEOBJECTINSTANCEW ddo = device->ddo[obj];
DWORD type;
if (old_action == action) return;
if (obj < 0) return;
type = device->ddo[obj].dwType;
/* Clear old action */
if (old_action != -1)
......@@ -320,7 +321,7 @@ static void assign_action(HWND dialog)
lv_set_action(dialog, used_obj, -1, lpdiaf);
/* Set new action */
lpdiaf->rgoAction[action].dwObjID = ddo.dwType;
lpdiaf->rgoAction[action].dwObjID = type;
lpdiaf->rgoAction[action].guidInstance = device->ddi.guidInstance;
lpdiaf->rgoAction[action].dwHow = DIAH_USERCONFIG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment