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

FLAC__stream_encoder_finish: Sanity improvement

Previously this function would abort or crash if passed `NULL` for
the encoder. Now it just returns without crashing or aborting which
is far more sane behaviour (ie much like FLAC__stream_encoder_delete).
parent 33f093ae
......@@ -1439,7 +1439,9 @@ FLAC_API FLAC__bool FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder)
{
FLAC__bool error = false;
FLAC__ASSERT(0 != encoder);
if (encoder == NULL)
return false;
FLAC__ASSERT(0 != encoder->private_);
FLAC__ASSERT(0 != encoder->protected_);
......
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