diff options
author | John Emmas <johne53@tiscali.co.uk> | 2014-12-13 12:46:24 +0000 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2014-12-13 12:46:24 +0000 |
commit | 90010d098f438fd889bfd2d8a6b4e7e822e35008 (patch) | |
tree | 1ce11092d3d1602a6843b58795f56c7e6ca61d4e /libs/ardour | |
parent | ee38c44109bff63828dac220107f4b54c4a809a3 (diff) |
Only attempt to close '_peakfile_fd' if we have a valid handle
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/audiosource.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index a032aa1f63..cc91ee9ba2 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -103,8 +103,10 @@ AudioSource::~AudioSource () cerr << "AudioSource destroyed with leftover peak data pending" << endl; } - close (_peakfile_fd); - _peakfile_fd = -1; + if ((-1) != _peakfile_fd) { + close (_peakfile_fd); + _peakfile_fd = -1; + } delete [] peak_leftovers; } |