Fix [#22227] Unbinding calls bind operator
authorMatt Ebb <matt@mke3.net>
Mon, 3 May 2010 02:01:38 +0000 (02:01 +0000)
committerMatt Ebb <matt@mke3.net>
Mon, 3 May 2010 02:01:38 +0000 (02:01 +0000)
Problem wasn't that the same operators was being called, just seems like the code wasn't updated after rev. 28376

source/blender/editors/object/object_modifier.c

index 121d78c8cb6eb824479b2b82d173c44ed96248d2..47816a5aaec599dca0c10e16c299f938e1d0e2bf 100644 (file)
@@ -1124,14 +1124,14 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
        if (!mmd)
                return OPERATOR_CANCELLED;
 
-       if(mmd->bindcos) {
+       if(mmd->bindcagecos) {
                if(mmd->bindweights) MEM_freeN(mmd->bindweights);
-               if(mmd->bindcos) MEM_freeN(mmd->bindcos);
+               if(mmd->bindcagecos) MEM_freeN(mmd->bindcagecos);
                if(mmd->dyngrid) MEM_freeN(mmd->dyngrid);
                if(mmd->dyninfluences) MEM_freeN(mmd->dyninfluences);
                if(mmd->dynverts) MEM_freeN(mmd->dynverts);
                mmd->bindweights= NULL;
-               mmd->bindcos= NULL;
+               mmd->bindcagecos= NULL;
                mmd->dyngrid= NULL;
                mmd->dyninfluences= NULL;
                mmd->dynverts= NULL;
@@ -1175,7 +1175,7 @@ static int meshdeform_bind_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        if (edit_modifier_invoke_properties(C, op))
                return meshdeform_bind_exec(C, op);
-       else
+       else 
                return OPERATOR_CANCELLED;
 }