fixed a memory deallocation error.
This commit is contained in:
@@ -170,7 +170,6 @@ OSErr SaveExporterSettingsToMem (QuicktimeCodecData *qcd)
|
|||||||
QTAtomContainer myContainer = NULL;
|
QTAtomContainer myContainer = NULL;
|
||||||
ComponentResult myErr = noErr;
|
ComponentResult myErr = noErr;
|
||||||
Ptr myPtr;
|
Ptr myPtr;
|
||||||
Handle myHandle;
|
|
||||||
long mySize = 0;
|
long mySize = 0;
|
||||||
|
|
||||||
// check if current scene already has qtcodec settings, and erase them
|
// check if current scene already has qtcodec settings, and erase them
|
||||||
@@ -197,9 +196,7 @@ OSErr SaveExporterSettingsToMem (QuicktimeCodecData *qcd)
|
|||||||
|
|
||||||
// lock and convert the atomcontainer to a *valid* pointer
|
// lock and convert the atomcontainer to a *valid* pointer
|
||||||
QTLockContainer(myContainer);
|
QTLockContainer(myContainer);
|
||||||
myHandle = (Handle) myContainer;
|
myPtr = *(Handle)myContainer;
|
||||||
HLockHi(myHandle);
|
|
||||||
myPtr = *myHandle;
|
|
||||||
|
|
||||||
// copy the Quicktime data into the blender qtcodecdata struct
|
// copy the Quicktime data into the blender qtcodecdata struct
|
||||||
if (myPtr) {
|
if (myPtr) {
|
||||||
@@ -214,8 +211,6 @@ OSErr SaveExporterSettingsToMem (QuicktimeCodecData *qcd)
|
|||||||
QTUnlockContainer(myContainer);
|
QTUnlockContainer(myContainer);
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
if (myHandle != NULL)
|
|
||||||
DisposeHandle(myHandle);
|
|
||||||
if (myContainer != NULL)
|
if (myContainer != NULL)
|
||||||
QTDisposeAtomContainer(myContainer);
|
QTDisposeAtomContainer(myContainer);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user