Commit 6925fb0b authored by Alexandre Julliard's avatar Alexandre Julliard

dinput: Add error check to silence a compiler warning.

parent 71ddc97b
......@@ -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