mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 21:55:43 +01:00
close audio-file if it cannot be opened
This commit is contained in:
parent
0761902b7e
commit
676a23e031
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue