APE file not destroyed when Fileref set to NULL
mpyne at kde.org
Mon Jul 8 23:07:23 UTC 2013
On Mon, July 8, 2013 20:17:15 Brett Hoyle wrote:
> Bool GetInfo(LPTSTR szSource)
> fileRef = TagLib::FileRef(szSource, 1, TagLib::AudioProperties::Fast);
> if( !fileRef.isNull() )
> if(apeFile = dynamic_cast<TagLib::APE::File *>( fileRef.file() ))
> if(apeFile->APETag()) <<Access violation for files after ape that are
> not ape file
> Should I be setting apeFile to NULL myself?
Well, the *pseudo-code* looks to be correct, assuming that dynamic_cast<> is
returning null for objects that are not APE::File*. Is there anywhere else in
the actual code where apeFile is being assigned?
Of course, you can try it anyways and reset all static members when you go
into your function and see if that fixes it. If so there's probably something
else going on within the rest of the code.
- Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: This is a digitally signed message part.
More information about the taglib-devel