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;
|
BPath path;
|
||||||
entry.GetPath(&path);
|
entry.GetPath(&path);
|
||||||
MultiAudioDevice *device = new MultiAudioDevice(path.Path() + strlen(rootPath), path.Path());
|
MultiAudioDevice *device = new MultiAudioDevice(path.Path() + strlen(rootPath), path.Path());
|
||||||
if(device && device->InitCheck() == B_OK)
|
if (device) {
|
||||||
fDevices.AddItem(device);
|
if (device->InitCheck() == B_OK)
|
||||||
|
fDevices.AddItem(device);
|
||||||
|
else
|
||||||
|
delete device;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,11 +36,9 @@
|
|||||||
|
|
||||||
class MultiAudioDevice
|
class MultiAudioDevice
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
virtual ~MultiAudioDevice(void);
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit MultiAudioDevice(const char *name, const char* path);
|
explicit MultiAudioDevice(const char *name, const char* path);
|
||||||
|
virtual ~MultiAudioDevice(void);
|
||||||
|
|
||||||
virtual status_t InitCheck(void) const;
|
virtual status_t InitCheck(void) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user