X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=types%2Fvariant.c;h=76573085d72510d547348ba2e533e968c0c03385;hb=96354dac0b8b6a3e433fa86d3249c510f90c3e7d;hp=0cf0ca6860de0434bbeac35be9d910297d5da03b;hpb=c054553dac076f91196b372fa19efaf2adc4e4f9;p=babeltrace.git diff --git a/types/variant.c b/types/variant.c index 0cf0ca68..76573085 100644 --- a/types/variant.c +++ b/types/variant.c @@ -243,5 +243,6 @@ variant_type_get_current_field(struct type_variant *variant) tag = g_array_index(tag_array, GQuark, 0); index = (unsigned long) g_hash_table_lookup(variant_class->fields_by_tag, (gconstpointer) (unsigned long) tag); - return &g_array_index(variant_class->fields, struct field, index); + variant->current_field = &g_array_index(variant_class->fields, struct field, index); + return variant->current_field; }