X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fattribute.c;h=176772dee2e77e35e29d7225fde9dd9cf9d2ff89;hb=3b43ea17ab7fa33c167cd5f09beabebe27a4f3fe;hp=d06958972474cbd89909dca23ebe738a0de258e1;hpb=ba576a781d5a1020ff7202ac9a959c9f4a0c7a4c;p=lttv.git diff --git a/ltt/branches/poly/lttv/attribute.c b/ltt/branches/poly/lttv/attribute.c index d0695897..176772de 100644 --- a/ltt/branches/poly/lttv/attribute.c +++ b/ltt/branches/poly/lttv/attribute.c @@ -151,8 +151,10 @@ lttv_attribute_remove(LttvAttribute *self, unsigned i) /* The element used to replace the removed element has its index entry all wrong now. Reinsert it with its new position. */ - g_hash_table_remove(self->names, GUINT_TO_POINTER(a->name)); - g_hash_table_insert(self->names, GUINT_TO_POINTER(a->name), GUINT_TO_POINTER(i + 1)); + if(self->attributes->len != i){ + g_hash_table_remove(self->names, GUINT_TO_POINTER(a->name)); + g_hash_table_insert(self->names, GUINT_TO_POINTER(a->name), GUINT_TO_POINTER(i + 1)); + } } void