Fixed removing from device list with only one device info present

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23487 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2008-01-13 12:34:27 +00:00
parent 8c2a9d7433
commit 5671893fc0
@@ -48,9 +48,11 @@ remove_device_info(pegasus_dev *device)
acquire_sem(gDeviceListLock);
if (sDeviceList == device)
if (sDeviceList == device) {
sDeviceList = device->next;
else {
--sDeviceCount;
gDeviceListChanged = true;
} else {
pegasus_dev *previous;
for (previous = sDeviceList; previous != NULL; previous = previous->next) {
if (previous->next == device) {