Fixed #111 -- removed unnecessary null checks.

This commit is contained in:
casey langen 2017-07-31 20:06:05 -07:00
parent 75abe1f0f5
commit d9a8b17a6f
2 changed files with 6 additions and 12 deletions

View File

@ -116,10 +116,8 @@ void LocalLibrary::Close() {
{
std::unique_lock<std::mutex> lock(this->mutex);
if (this->indexer) {
delete this->indexer;
this->indexer = nullptr;
}
delete this->indexer;
this->indexer = nullptr;
if (this->thread) {
thread = this->thread;

View File

@ -52,15 +52,11 @@ FlacDecoder::FlacDecoder()
}
FlacDecoder::~FlacDecoder() {
if (this->decoder) {
FLAC__stream_decoder_delete(this->decoder);
this->decoder = NULL;
}
FLAC__stream_decoder_delete(this->decoder);
this->decoder = NULL;
if (this->outputBuffer) {
delete this->outputBuffer;
this->outputBuffer = NULL;
}
delete this->outputBuffer;
this->outputBuffer = NULL;
}
FLAC__StreamDecoderReadStatus FlacDecoder::FlacRead(