13
0

close audio-file if it cannot be opened

This commit is contained in:
Robin Gareus 2013-06-07 18:56:48 +02:00
parent 0761902b7e
commit 676a23e031

View File

@ -96,6 +96,10 @@ SndFileDescriptor::open ()
_sndfile = sf_open_fd (fd, _writeable ? SFM_RDWR : SFM_READ, _info, 1);
if (sf_open_fd == 0) {
::close(fd);
}
return (_sndfile == 0);
}