git-svn-id: http://ltt.polymtl.ca/svn@179 04897980-b3bd-0310-b5e0-8ef037075253
[lttv.git] / ltt / branches / poly / lttv / attribute.c
index d06958972474cbd89909dca23ebe738a0de258e1..176772dee2e77e35e29d7225fde9dd9cf9d2ff89 100644 (file)
@@ -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 
This page took 0.024029 seconds and 4 git commands to generate.