Unprotected MultiAudioDevice destructor.
Now deletes MultiAudioDevices which don't init correctly. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8663 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -235,8 +235,12 @@ MultiAudioAddOn::RecursiveScan(char* rootPath, BEntry *rootEntry = NULL)
|
||||
BPath path;
|
||||
entry.GetPath(&path);
|
||||
MultiAudioDevice *device = new MultiAudioDevice(path.Path() + strlen(rootPath), path.Path());
|
||||
if(device && device->InitCheck() == B_OK)
|
||||
fDevices.AddItem(device);
|
||||
if (device) {
|
||||
if (device->InitCheck() == B_OK)
|
||||
fDevices.AddItem(device);
|
||||
else
|
||||
delete device;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,11 +36,9 @@
|
||||
|
||||
class MultiAudioDevice
|
||||
{
|
||||
protected:
|
||||
virtual ~MultiAudioDevice(void);
|
||||
public:
|
||||
|
||||
explicit MultiAudioDevice(const char *name, const char* path);
|
||||
virtual ~MultiAudioDevice(void);
|
||||
|
||||
virtual status_t InitCheck(void) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user