diff --git a/plugins/common/libs/image/libextplugin/src/heif_impl/heif_parser/heif_parser.cpp b/plugins/common/libs/image/libextplugin/src/heif_impl/heif_parser/heif_parser.cpp index 854b6e922188e96924f0d1ed92997795df718335..4156717c53c17fc41e891624aeca0a1ff23e16e9 100644 --- a/plugins/common/libs/image/libextplugin/src/heif_impl/heif_parser/heif_parser.cpp +++ b/plugins/common/libs/image/libextplugin/src/heif_impl/heif_parser/heif_parser.cpp @@ -994,6 +994,9 @@ heif_error HeifParser::SetMetadata(const std::shared_ptr &image, cons const char *item_type, const char *content_type) { auto metadataInfe = AddItem(item_type, true); + if (metadataInfe == nullptr) { + return heif_invalid_exif_data; + } if (content_type != nullptr) { metadataInfe->SetContentType(content_type); }