mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Fixed #111 -- removed unnecessary null checks.
This commit is contained in:
parent
75abe1f0f5
commit
d9a8b17a6f
@ -116,10 +116,8 @@ void LocalLibrary::Close() {
|
|||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(this->mutex);
|
std::unique_lock<std::mutex> lock(this->mutex);
|
||||||
|
|
||||||
if (this->indexer) {
|
delete this->indexer;
|
||||||
delete this->indexer;
|
this->indexer = nullptr;
|
||||||
this->indexer = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->thread) {
|
if (this->thread) {
|
||||||
thread = this->thread;
|
thread = this->thread;
|
||||||
|
@ -52,15 +52,11 @@ FlacDecoder::FlacDecoder()
|
|||||||
}
|
}
|
||||||
|
|
||||||
FlacDecoder::~FlacDecoder() {
|
FlacDecoder::~FlacDecoder() {
|
||||||
if (this->decoder) {
|
FLAC__stream_decoder_delete(this->decoder);
|
||||||
FLAC__stream_decoder_delete(this->decoder);
|
this->decoder = NULL;
|
||||||
this->decoder = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->outputBuffer) {
|
delete this->outputBuffer;
|
||||||
delete this->outputBuffer;
|
this->outputBuffer = NULL;
|
||||||
this->outputBuffer = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FLAC__StreamDecoderReadStatus FlacDecoder::FlacRead(
|
FLAC__StreamDecoderReadStatus FlacDecoder::FlacRead(
|
||||||
|
Loading…
Reference in New Issue
Block a user