fix for leak when switching between transform rotation modes.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 13 Oct 2011 04:44:39 +0000 (04:44 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 13 Oct 2011 04:44:39 +0000 (04:44 +0000)
source/blender/editors/transform/transform_input.c

index a1e1c0e0b1ddb8ab2490d2c82f74b32c42829b42..125ba8b511d09faca3f751c7fe8f7e862c395e87 100644 (file)
@@ -312,6 +312,11 @@ static void calcSpringFactor(MouseInput *mi)
 
 void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
 {
+       /* may have been allocated previously */
+       if(mi->data) {
+               MEM_freeN(mi->data);
+               mi->data= NULL;
+       }
 
        switch(mode)
        {