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>2013-02-13 19:03:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-13 19:03:36 +0400
commitfe855a83d7326568e413de36c79294a1843b2fa3 (patch)
treeea3cf1873821c1a035db76c83027f6b6bbed6cb1 /source/blender/editors/object/object_hook.c
parent5016ea5cb296ebaaf5c89cab02fa9001e4031ae9 (diff)
fix for missing typecheck on hook-assign operator.
fix for POSELIB_OT_pose_rename getting an enum as an int.
Diffstat (limited to 'source/blender/editors/object/object_hook.c')
-rw-r--r--source/blender/editors/object/object_hook.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index caeff1e82a7..7060c69cb9e 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -798,7 +798,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op)
ob = CTX_data_edit_object(C);
hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num);
}
- if (!ob || !hmd) {
+ if (!ob || !hmd || (hmd->modifier.type != eModifierType_Hook)) {
BKE_report(op->reports, RPT_ERROR, "Could not find hook modifier");
return OPERATOR_CANCELLED;
}