xbmc/xbmc — pull request #5299 by ace20022 (2014-08-29 13:13:04+00:00)
Title: [win32][Fix] Set hDeviceNotify to 0 after a successful UnregisterDeviceN...

...otification call.

UnregisterDeviceNotification gets called twice on exit ( I have not checked why). The second call fails.
AppVerifier reports "First chance access violation for current stack trace."
GetLastError is ```ERROR_INVALID_USER_BUFFER 1784 (0x6F8) The supplied user buffer is not valid for the requested operation.```