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:
authorJoshua Leung <aligorith@gmail.com>2010-05-14 14:28:29 +0400
committerJoshua Leung <aligorith@gmail.com>2010-05-14 14:28:29 +0400
commit56808c6d75c4e44d119000319ad46993dacfa5a6 (patch)
tree76838864865cc410f791c2f0e9db6f5a84ab4bc5 /source/blender/editors/animation/keyingsets.c
parentc598d908994ffbe5ab34e7c43a3bafca0e8420b7 (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/keyingsets.c')
-rw-r--r--source/blender/editors/animation/keyingsets.c12
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);