Fix crash in new CoreaudioSource code (on invalid file)

This commit is contained in:
Robin Gareus 2015-10-21 03:12:45 +02:00
parent 270ec425f8
commit f84798ff75

View File

@ -264,7 +264,7 @@ CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string&)
#else
CFURLRef url = CFURLCreateFromFileSystemRepresentation (kCFAllocatorDefault, (const UInt8*)path.c_str (), strlen (path.c_str ()), false);
OSStatus res = ExtAudioFileOpenURL(url, &af);
CFRelease (url);
if (url) CFRelease (url);
if (res != noErr) {
goto out;