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:
authorCampbell Barton <ideasman42@gmail.com>2017-09-06 18:55:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-06 18:56:42 +0300
commitfb2e0592bca070c1270190bf1db41512846323c2 (patch)
treef5e5bd95d28ba49bbfd42da6d4433b71b2b67e6b /source/blender/editors/manipulator_library/manipulator_types
parente2f42ff907313c56f57486ba923c9eb957520550 (diff)
Fix crash using arrow manipulator
Diffstat (limited to 'source/blender/editors/manipulator_library/manipulator_types')
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c10
1 files changed, 7 insertions, 3 deletions
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;
}