fix potential crash
This commit is contained in:
@@ -35,7 +35,7 @@ OSStatus AudioConverter::FormatConverterInputProc(UInt32& ioNumberDataPackets,
|
||||
// This really shouldn't happen more than once, but better be sure.
|
||||
if( mBufferSize != buf.mDataByteSize )
|
||||
{
|
||||
delete mBuffer;
|
||||
delete [] mBuffer;
|
||||
mBufferSize = buf.mDataByteSize;
|
||||
mBuffer = new UInt8[mBufferSize];
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class AudioConverter : public FormatConverterClient
|
||||
{
|
||||
public:
|
||||
AudioConverter( RageSound_CA *driver, const Desc &procFormat );
|
||||
~AudioConverter() { delete mBuffer; }
|
||||
~AudioConverter() { delete [] mBuffer; }
|
||||
protected:
|
||||
OSStatus FormatConverterInputProc(UInt32& ioNumberDataPackets,
|
||||
AudioBufferList& ioData,
|
||||
|
||||
Reference in New Issue
Block a user