diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-05-14 14:28:29 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-05-14 14:28:29 +0400 |
commit | 56808c6d75c4e44d119000319ad46993dacfa5a6 (patch) | |
tree | 76838864865cc410f791c2f0e9db6f5a84ab4bc5 /source/blender/editors/animation | |
parent | c598d908994ffbe5ab34e7c43a3bafca0e8420b7 (diff) |
Fixes for crashes when trying to add/remove properties from builtin Keying Sets, which shouldn't be editable in this way.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index f0f35b852bb..49b8c1101d6 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -164,6 +164,10 @@ static int remove_active_keyingset_exec (bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "No active Keying Set to remove"); return OPERATOR_CANCELLED; } + else if (scene->active_keyingset < 0) { + BKE_report(op->reports, RPT_ERROR, "Cannot remove built in Keying Set"); + return OPERATOR_CANCELLED; + } else ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); @@ -315,6 +319,10 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op) scene->active_keyingset= BLI_countlist(&scene->keyingsets); } + else if (scene->active_keyingset < 0) { + BKE_report(op->reports, RPT_ERROR, "Cannot add property to built in Keying Set"); + return OPERATOR_CANCELLED; + } else ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); @@ -396,6 +404,10 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "No active Keying Set to remove property from"); return OPERATOR_CANCELLED; } + else if (scene->active_keyingset < 0) { + BKE_report(op->reports, RPT_ERROR, "Cannot remove property from built in Keying Set"); + return OPERATOR_CANCELLED; + } else ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); |