mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
metadata: don't dereference the pointer before the validity check
This commit is contained in:
parent
cae6b621aa
commit
51e022d288
1 changed files with 3 additions and 1 deletions
|
@ -556,11 +556,13 @@ metadataparse_exif_content_foreach_entry_func (ExifEntry * entry,
|
||||||
MEUserData *meudata = (MEUserData *) user_data;
|
MEUserData *meudata = (MEUserData *) user_data;
|
||||||
GType type = G_TYPE_NONE;
|
GType type = G_TYPE_NONE;
|
||||||
ExifByteOrder byte_order;
|
ExifByteOrder byte_order;
|
||||||
const gchar *tag = metadataparse_exif_get_tag_from_exif (entry->tag, &type);
|
const gchar *tag;
|
||||||
|
|
||||||
/* We need the byte order */
|
/* We need the byte order */
|
||||||
if (!entry || !entry->parent || !entry->parent->parent)
|
if (!entry || !entry->parent || !entry->parent->parent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
tag = metadataparse_exif_get_tag_from_exif (entry->tag, &type);
|
||||||
byte_order = exif_data_get_byte_order (entry->parent->parent);
|
byte_order = exif_data_get_byte_order (entry->parent->parent);
|
||||||
|
|
||||||
if (metadataparse_handle_unit_tags (entry, meudata, byte_order))
|
if (metadataparse_handle_unit_tags (entry, meudata, byte_order))
|
||||||
|
|
Loading…
Reference in a new issue