clear button states at startup *and* shutdown
[ardour.git] / libs / ardour / coreaudiosource.cc
index 52b4f21ce74566a492d39a42fa68e528d05c041e..90ab07b86d5df7ac1f5104b7cfea6b44ef9f8131 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <glibmm/fileutils.h>
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 #include <AudioToolbox/AudioFormat.h>
 
@@ -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;