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).
This commit is contained in:
parent
33f093ae2f
commit
006dcfbe23
@ -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_);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user