fDeviceAddons wasn't maintained correctly. this fixes #2610
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27092 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2a1a5a296f
commit
3658735727
@ -242,7 +242,7 @@ DeviceManager::StopMonitoringDevice(_BDeviceAddOn_ *addon,
|
||||
BDirectory directory;
|
||||
BPath path("/dev");
|
||||
if (((err = path.Append(device)) != B_OK)
|
||||
|| ((err = directory.SetTo(path.Path())) != B_OK)
|
||||
|| ((err = directory.SetTo(path.Path())) != B_OK)
|
||||
|| ((err = directory.GetNodeRef(&nref)) != B_OK))
|
||||
return err;
|
||||
|
||||
@ -263,7 +263,7 @@ DeviceManager::StopMonitoringDevice(_BDeviceAddOn_ *addon,
|
||||
}
|
||||
}
|
||||
if (stillMonitored)
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
// remove from list
|
||||
@ -277,6 +277,10 @@ DeviceManager::StopMonitoringDevice(_BDeviceAddOn_ *addon,
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
if (addon->fMonitoredRefs.IsEmpty()) {
|
||||
fDeviceAddons.RemoveItem(addon);
|
||||
}
|
||||
|
||||
// stop monitoring if needed
|
||||
if (!stillMonitored) {
|
||||
|
Loading…
Reference in New Issue
Block a user