commit | b306aefd01b817ebd3f6623657915f60b29dc365 | [log] [tgz] |
---|---|---|
author | Paul McLean <pmclean@google.com> | Tue Apr 28 12:07:31 2020 -0600 |
committer | Paul McLean <pmclean@google.com> | Wed Apr 29 07:37:48 2020 -0600 |
tree | 1317e0bf33d57a024fc322094a8dd7acd11a04ef | |
parent | 1ca821bf0e792f19b13a66b09366bdc7c869dd60 [diff] |
Set pointer to null on delete.
diff --git a/samples/iolib/src/main/cpp/player/SampleBuffer.cpp b/samples/iolib/src/main/cpp/player/SampleBuffer.cpp index 42078b6..9808ac8 100644 --- a/samples/iolib/src/main/cpp/player/SampleBuffer.cpp +++ b/samples/iolib/src/main/cpp/player/SampleBuffer.cpp
@@ -36,6 +36,7 @@ void SampleBuffer::unloadSampleData() { if (mSampleData != nullptr) { delete[] mSampleData; + mSampleData = nullptr; } mNumSamples = 0; }