Rémi Bernon (@rbernon) commented about dlls/joy.cpl/dinput.c:
case PSN_RESET: case PSN_KILLACTIVE: UnregisterDeviceNotification( devnotify );
devnotify = NULL;
```suggestion:-1+0 if (!devnotify) break; UnregisterDeviceNotification( devnotify ); devnotify = NULL; ```
If we're going through this multiple times I think the other statements below will also have problems (closing handles twice, etc).