setupapi: Only delete unregistered device interfaces when deleting a device.

Fixes a regression introduced by 86d26dded5.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-08-19 15:23:14 -05:00 committed by Alexandre Julliard
parent e525e49976
commit 9ccf51e3c1
1 changed files with 1 additions and 1 deletions

View File

@ -524,7 +524,7 @@ static void SETUPDI_RemoveDevice(struct device *device)
struct device_iface, entry)
{
list_remove(&iface->entry);
if ((path = get_refstr_key_path(iface)))
if (device->phantom && (path = get_refstr_key_path(iface)))
{
RegDeleteKeyW(HKEY_LOCAL_MACHINE, path);
heap_free(path);