fix [#36942] unfreed memory on trackball widget use
authorCampbell Barton <ideasman42@gmail.com>
Fri, 4 Oct 2013 01:10:23 +0000 (01:10 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 4 Oct 2013 01:10:23 +0000 (01:10 +0000)
source/blender/editors/transform/transform_manipulator.c

index ee9bf486c20c284f11e082ea6fb052154bb29a7f..f667a98812b8e206f0184686dde60bd7b5735159 100644 (file)
@@ -1858,11 +1858,12 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op)
                         * See [#34621], it's a miracle it did not cause more problems!!! */
                        /* However, we need to copy the "release_confirm" property... */
                        PointerRNA props_ptr;
-                       WM_operator_properties_create(&props_ptr, "TRANSFORM_OT_trackball");
+                       wmOperatorType *ot = WM_operatortype_find("TRANSFORM_OT_trackball", true);
+                       WM_operator_properties_create_ptr(&props_ptr, ot);
                        RNA_boolean_set(&props_ptr, "release_confirm", RNA_boolean_get(op->ptr, "release_confirm"));
-
-                       WM_operator_name_call(C, "TRANSFORM_OT_trackball", WM_OP_INVOKE_DEFAULT, &props_ptr);
-                       //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_trackball", 0), event, NULL, NULL, FALSE);
+                       WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, &props_ptr);
+                       //wm_operator_invoke(C, WM_operatortype_find(ot->idname, 0), event, NULL, NULL, FALSE);
+                       WM_operator_properties_free(&props_ptr);
                }
                else if (drawflags & MAN_ROT_C) {
                        switch (drawflags) {