Commit feab11e9 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

Fix FLAC__stream_decoder_delete() and FLAC__stream_encoder_delete()

so that they will simply return if passed a NULL pointer (ie just
like the C free() stdlib function).
parent 63c874f0
......@@ -332,7 +332,9 @@ FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder)
{
unsigned i;
FLAC__ASSERT(0 != decoder);
if (decoder == NULL)
return ;
FLAC__ASSERT(0 != decoder->protected_);
FLAC__ASSERT(0 != decoder->private_);
FLAC__ASSERT(0 != decoder->private_->input);
......
......@@ -578,7 +578,9 @@ FLAC_API void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder)
{
unsigned i;
FLAC__ASSERT(0 != encoder);
if (encoder == NULL)
return ;
FLAC__ASSERT(0 != encoder->protected_);
FLAC__ASSERT(0 != encoder->private_);
FLAC__ASSERT(0 != encoder->private_->frame);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment