diff --git a/src/core/library/LocalLibrary.cpp b/src/core/library/LocalLibrary.cpp index e71d7474c..33b08bf31 100644 --- a/src/core/library/LocalLibrary.cpp +++ b/src/core/library/LocalLibrary.cpp @@ -116,10 +116,8 @@ void LocalLibrary::Close() { { std::unique_lock lock(this->mutex); - if (this->indexer) { - delete this->indexer; - this->indexer = nullptr; - } + delete this->indexer; + this->indexer = nullptr; if (this->thread) { thread = this->thread; diff --git a/src/plugins/flacdecoder/FlacDecoder.cpp b/src/plugins/flacdecoder/FlacDecoder.cpp index 119a7c54d..ffd6abeb2 100644 --- a/src/plugins/flacdecoder/FlacDecoder.cpp +++ b/src/plugins/flacdecoder/FlacDecoder.cpp @@ -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(