[Bf-blender-cvs] [fb2e0592bca] blender2.8: Fix crash using arrow manipulator

Campbell Barton noreply at git.blender.org
Wed Sep 6 17:48:51 CEST 2017


Commit: fb2e0592bca070c1270190bf1db41512846323c2
Author: Campbell Barton
Date:   Thu Sep 7 01:55:32 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBfb2e0592bca070c1270190bf1db41512846323c2

Fix crash using arrow manipulator

===================================================================

M	source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c

===================================================================

diff --git a/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
index 21ebbba46cf..3bbcafb925a 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
@@ -399,17 +399,21 @@ static void manipulator_arrow_exit(bContext *C, wmManipulator *mpr, const bool c
 	ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
 	ManipulatorCommonData *data = &arrow->data;
 	wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
+	const bool is_prop_valid = WM_manipulator_target_property_is_valid(mpr_prop);
 
 	if (!cancel) {
 		/* Assign incase applying the opetration needs an updated offset
 		 * editmesh bisect needs this. */
-		data->offset = WM_manipulator_target_property_value_get(mpr, mpr_prop);
+		if (is_prop_valid) {
+			data->offset = WM_manipulator_target_property_value_get(mpr, mpr_prop);
+		}
 		return;
 	}
 
 	ManipulatorInteraction *inter = mpr->interaction_data;
-
-	manipulator_property_value_reset(C, mpr, inter, mpr_prop);
+	if (is_prop_valid) {
+		manipulator_property_value_reset(C, mpr, inter, mpr_prop);
+	}
 	data->offset = inter->init_offset;
 }



More information about the Bf-blender-cvs mailing list