Merging r59182 through r59257 from trunk into soc-2013-depsgraph_mt
[blender-staging.git] / source / blender / blenkernel / intern / object_deform.c
index 0294ff5645712f6d6c017a4f86e92819092a0d44..9cb7c91decd117cfff9a595dc3c385c0263fa5f9 100644 (file)
@@ -101,11 +101,13 @@ bool *BKE_objdef_validmap_get(Object *ob, const int defbase_tot)
                                bPoseChannel *chan;
 
                                for (chan = pose->chanbase.first; chan; chan = chan->next) {
+                                       void **val_p;
                                        if (chan->bone->flag & BONE_NO_DEFORM)
                                                continue;
 
-                                       if (BLI_ghash_remove(gh, chan->name, NULL, NULL)) {
-                                               BLI_ghash_insert(gh, chan->name, SET_INT_IN_POINTER(1));
+                                       val_p = BLI_ghash_lookup_p(gh, chan->name);
+                                       if (val_p) {
+                                               *val_p = SET_INT_IN_POINTER(1);
                                        }
                                }
                        }