mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Only attempt to close our peakfile '_fd' if we have a valid handle
(yesterday's fix was needed in a 2nd place)
This commit is contained in:
parent
90010d098f
commit
1b3fb142f0
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue