diff options
Diffstat (limited to 'plugins/kaitai/record.c')
-rw-r--r-- | plugins/kaitai/record.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/kaitai/record.c b/plugins/kaitai/record.c index 5717b17..db573ed 100644 --- a/plugins/kaitai/record.c +++ b/plugins/kaitai/record.c @@ -331,12 +331,16 @@ static GMatchRecord *_g_match_record_find_by_name(GMatchRecord *record, const ch { label = g_kaitai_attribute_get_label(G_KAITAI_ATTRIBUTE(record->creator)); - label_len = strlen(label); - - if (label_len == len && strncmp(label, name, len) == 0) + if (label != NULL) { - result = record; - g_object_ref(G_OBJECT(result)); + label_len = strlen(label); + + if (label_len == len && strncmp(label, name, len) == 0) + { + result = record; + g_object_ref(G_OBJECT(result)); + } + } } |