Skip to content

Commit

Permalink
Revert "Guard diag in avifDiagnosticsClearError()"
Browse files Browse the repository at this point in the history
This reverts commit 173961d in the
1.0.0 release, to give us more time to re-evaluate
AOMediaCodec#1496.
  • Loading branch information
wantehchang committed Aug 25, 2023
1 parent a78b867 commit bd6bc1d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

void avifDiagnosticsClearError(avifDiagnostics * diag)
{
if (diag) {
*diag->error = '\0';
}
*diag->error = '\0';
}

#ifdef __clang__
Expand All @@ -20,6 +18,7 @@ __attribute__((__format__(__printf__, 2, 3)))
void avifDiagnosticsPrintf(avifDiagnostics * diag, const char * format, ...)
{
if (!diag) {
// It is possible this is NULL (e.g. calls to avifPeekCompatibleFileType())
return;
}
if (*diag->error) {
Expand Down

0 comments on commit bd6bc1d

Please sign in to comment.