Skip to content

Commit

Permalink
read.c: relocate pointer check
Browse files Browse the repository at this point in the history
  • Loading branch information
jzern committed Mar 18, 2024
1 parent 8d8ed47 commit 0ca98f2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,10 +760,6 @@ static avifMeta * avifMetaCreate()

static void avifMetaDestroy(avifMeta * meta)
{
if (meta == NULL) {
return;
}

for (uint32_t i = 0; i < meta->items.count; ++i) {
avifDecoderItem * item = meta->items.item[i];
avifArrayDestroy(&item->properties);
Expand Down Expand Up @@ -997,7 +993,9 @@ static void avifDecoderDataClearTiles(avifDecoderData * data)

static void avifDecoderDataDestroy(avifDecoderData * data)
{
avifMetaDestroy(data->meta);
if (data->meta) {
avifMetaDestroy(data->meta);
}
for (uint32_t i = 0; i < data->tracks.count; ++i) {
avifTrack * track = &data->tracks.track[i];
if (track->sampleTable) {
Expand Down

0 comments on commit 0ca98f2

Please sign in to comment.