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:
@@ -48,9 +48,11 @@ remove_device_info(pegasus_dev *device)
|
|||||||
|
|
||||||
acquire_sem(gDeviceListLock);
|
acquire_sem(gDeviceListLock);
|
||||||
|
|
||||||
if (sDeviceList == device)
|
if (sDeviceList == device) {
|
||||||
sDeviceList = device->next;
|
sDeviceList = device->next;
|
||||||
else {
|
--sDeviceCount;
|
||||||
|
gDeviceListChanged = true;
|
||||||
|
} else {
|
||||||
pegasus_dev *previous;
|
pegasus_dev *previous;
|
||||||
for (previous = sDeviceList; previous != NULL; previous = previous->next) {
|
for (previous = sDeviceList; previous != NULL; previous = previous->next) {
|
||||||
if (previous->next == device) {
|
if (previous->next == device) {
|
||||||
|
|||||||
Reference in New Issue
Block a user