mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 12:23:28 +00:00
Don't crash during disconnection if a device doesn't have a driver
svn path=/trunk/; revision=23728
This commit is contained in:
@@ -922,6 +922,14 @@ gendrv_do_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE if_handle, BOOLEAN is_
|
||||
pdrvr = pdev->dev_driver;
|
||||
dev_obj = pdev->dev_obj;
|
||||
}
|
||||
|
||||
if (dev_obj == NULL)
|
||||
{
|
||||
// it means no driver was found for the device and thus no device object created
|
||||
// we just do nothing here
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
pdrvr_ext = (PGENDRV_DRVR_EXTENSION) pdrvr->driver_ext;
|
||||
pdev_ext = (PGENDRV_DEVICE_EXTENSION) dev_obj->DeviceExtension;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user