diff options
author | John Emmas <johne53@tiscali.co.uk> | 2014-12-14 10:39:29 +0000 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2014-12-14 10:39:29 +0000 |
commit | 1b3fb142f0e1e2015d3ea9caee7a9b26734d6881 (patch) | |
tree | 43d8b70505716c5e0d37e2ef167d4b540743df14 /libs/ardour/audiosource.cc | |
parent | 90010d098f438fd889bfd2d8a6b4e7e822e35008 (diff) |
Only attempt to close our peakfile '_fd' if we have a valid handle
(yesterday's fix was needed in a 2nd place)
Diffstat (limited to 'libs/ardour/audiosource.cc')
-rw-r--r-- | libs/ardour/audiosource.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index cc91ee9ba2..f543c3ee08 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -322,7 +322,7 @@ AudioSource::read_peaks (PeakData *peaks, framecnt_t npeaks, framepos_t start, f struct ScopedFileDescriptor { ScopedFileDescriptor (int fd) : _fd (fd) {} - ~ScopedFileDescriptor() { close (_fd); } + ~ScopedFileDescriptor() { if ((-1) != _fd) close (_fd); } operator int() { return _fd; } int _fd; }; |