Fixing use-after-free resulting in heap corruption

This commit is contained in:
Eoin Mcloughlin
2016-10-09 19:15:29 +01:00
parent 45858cf001
commit 23490a0954
12 changed files with 22 additions and 24 deletions

View File

@@ -22,7 +22,7 @@
#include "samplebuffer.h"
template <typename Tin, typename Tout>
SampleBuffer<Tin, Tout>::SampleBuffer(SampleSource<Tin> *src) : src(src)
SampleBuffer<Tin, Tout>::SampleBuffer(std::shared_ptr<SampleSource<Tin>> src) : src(src)
{
src->subscribe(this);
}