No point in checking the new device for NULL if it's not nothrow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42474 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -197,8 +197,9 @@ MultiAudioAddOn::_RecursiveScan(const char* rootPath, BEntry* rootEntry, uint32
|
|||||||
} else {
|
} else {
|
||||||
BPath path;
|
BPath path;
|
||||||
entry.GetPath(&path);
|
entry.GetPath(&path);
|
||||||
MultiAudioDevice *device = new MultiAudioDevice(path.Path()
|
MultiAudioDevice *device =
|
||||||
+ strlen(rootPath), path.Path());
|
new(std::nothrow) MultiAudioDevice(path.Path()
|
||||||
|
+ strlen(rootPath), path.Path());
|
||||||
if (device) {
|
if (device) {
|
||||||
if (device->InitCheck() == B_OK)
|
if (device->InitCheck() == B_OK)
|
||||||
fDevices.AddItem(device);
|
fDevices.AddItem(device);
|
||||||
|
|||||||
Reference in New Issue
Block a user