diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-07 11:33:43 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-07 11:34:01 +0300 |
commit | 9b86c90193973b1a6b3afad35af9a015a65dac45 (patch) | |
tree | 4a0f172d99a9b5cdcf01f847b85c1edde41d9b4f /source/blender | |
parent | d6c0f3796a3dd6d9fb6996e1e7d12633f982e560 (diff) |
Fix for images without metadata crashing
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/imbuf/intern/metadata.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/metadata.c b/source/blender/imbuf/intern/metadata.c index 01b9abe6a38..07e77aee9d4 100644 --- a/source/blender/imbuf/intern/metadata.c +++ b/source/blender/imbuf/intern/metadata.c @@ -105,6 +105,9 @@ void IMB_metadata_set_field(struct IDProperty *metadata, const char *key, const void IMB_metadata_foreach(struct ImBuf *ibuf, IMBMetadataForeachCb callback, void *userdata) { + if (ibuf->metadata == NULL) { + return; + } for (IDProperty *prop = ibuf->metadata->data.group.first; prop != NULL; prop = prop->next) { callback(prop->name, IDP_String(prop), userdata); } |