diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-13 19:03:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-13 19:03:36 +0400 |
commit | fe855a83d7326568e413de36c79294a1843b2fa3 (patch) | |
tree | ea3cf1873821c1a035db76c83027f6b6bbed6cb1 /source/blender/editors | |
parent | 5016ea5cb296ebaaf5c89cab02fa9001e4031ae9 (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')
-rw-r--r-- | source/blender/editors/armature/poselib.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_hook.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index b2c1b7fdcd0..48c0a4a38c3 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -663,7 +663,7 @@ static int poselib_rename_exec(bContext *C, wmOperator *op) } /* get index (and pointer) of pose to remove */ - marker = BLI_findlink(&act->markers, RNA_int_get(op->ptr, "pose")); + marker = BLI_findlink(&act->markers, RNA_enum_get(op->ptr, "pose")); if (marker == NULL) { BKE_report(op->reports, RPT_ERROR, "Invalid index for pose"); return OPERATOR_CANCELLED; 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; } |