mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
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:
@@ -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_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user