[Bf-blender-cvs] [60c3289] wiggly-widgets: Fix memory leak in manipulator code
Julian Eisel
noreply at git.blender.org
Wed Sep 16 23:04:44 CEST 2015
Commit: 60c3289df582b822c946d47d2d404a407ba796c0
Author: Julian Eisel
Date: Wed Sep 16 23:03:36 2015 +0200
Branches: wiggly-widgets
https://developer.blender.org/rB60c3289df582b822c946d47d2d404a407ba796c0
Fix memory leak in manipulator code
===================================================================
M source/blender/editors/transform/transform_manipulator.c
===================================================================
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 0d93e18..6009638 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -1075,7 +1075,7 @@ void WIDGETGROUP_manipulator_create(const struct bContext *C, struct wmWidgetGro
const bool trans_visble = (any_visible && (v3d->twtype & V3D_MANIP_TRANSLATE));
const bool rot_visble = (any_visible && (v3d->twtype & V3D_MANIP_ROTATE));
const bool scale_visible = (any_visible && (v3d->twtype & V3D_MANIP_SCALE));
- const ManipulatorGroup *man = manipulatorgroup_init(wgroup, trans_visble, rot_visble, scale_visible);
+ ManipulatorGroup *man = manipulatorgroup_init(wgroup, trans_visble, rot_visble, scale_visible);
if (!man)
return;
@@ -1192,6 +1192,8 @@ void WIDGETGROUP_manipulator_create(const struct bContext *C, struct wmWidgetGro
RNA_boolean_set(ptr, "release_confirm", 1);
}
MAN_ITER_AXES_END;
+
+ MEM_freeN(man);
}
void WIDGETGROUP_object_manipulator_create(const struct bContext *C, struct wmWidgetGroup *wgroup)
More information about the Bf-blender-cvs
mailing list