Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r--source/blender/editors/transform/transform_ops.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 29bcd4e8592..76866d9a0dc 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -32,7 +32,6 @@
#include "BLI_math.h"
-#include "BKE_utildefines.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -281,7 +280,7 @@ static int transformops_data(bContext *C, wmOperator *op, wmEvent *event)
int retval = 1;
if (op->customdata == NULL)
{
- TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data");
+ TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data2");
TransformModeItem *tmode;
int mode = -1;
@@ -303,7 +302,12 @@ static int transformops_data(bContext *C, wmOperator *op, wmEvent *event)
G.moving = 1;
/* store data */
- op->customdata = t;
+ if(retval) {
+ op->customdata = t;
+ }
+ else {
+ MEM_freeN(t);
+ }
}
return retval; /* return 0 on error */