summaryrefslogtreecommitdiff
path: root/src/audiocache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/audiocache.cc')
-rw-r--r--src/audiocache.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/audiocache.cc b/src/audiocache.cc
index e3be20b..2e9eaf8 100644
--- a/src/audiocache.cc
+++ b/src/audiocache.cc
@@ -277,7 +277,10 @@ void AudioCache::setFrameSize(std::size_t framesize)
if(framesize > nodata_framesize)
{
- delete[] nodata;
+ if(nodata)
+ {
+ nodata_dirty.emplace_back(std::move(nodata)); // Store for later deletion.
+ }
nodata = new sample_t[framesize];
nodata_framesize = framesize;