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>2009-06-12 06:49:21 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-12 06:49:21 +0400
commit4f9846b6a13184c504682853beb2647b4a77e9ac (patch)
tree374949edcf969de7d69b2de21bbbef4e6942eb91 /source/blender/editors/space_action
parentcdeb95e737f6995b3b4cb2ced1a966f787167c1b (diff)
NLA SoC: Fixes for crashes when selecting keyframes in object channels in DopeSheet
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_select.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index d8ed3fd1068..826728e83f9 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -858,17 +858,19 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
/* Highlight Action-Group or F-Curve? */
- if (ale->type == ANIMTYPE_GROUP) {
- bActionGroup *agrp= ale->data;
-
- agrp->flag |= AGRP_SELECTED;
- ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
- }
- else if (ale->type == ANIMTYPE_FCURVE) {
- FCurve *fcu= ale->data;
-
- fcu->flag |= FCURVE_SELECTED;
- ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
+ if (ale && ale->data) {
+ if (ale->type == ANIMTYPE_GROUP) {
+ bActionGroup *agrp= ale->data;
+
+ agrp->flag |= AGRP_SELECTED;
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
+ }
+ else if (ale->type == ANIMTYPE_FCURVE) {
+ FCurve *fcu= ale->data;
+
+ fcu->flag |= FCURVE_SELECTED;
+ ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
+ }
}
}
else if (ac->datatype == ANIMCONT_GPENCIL) {
@@ -881,7 +883,7 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode,
}
/* only select keyframes if we clicked on a valid channel and hit something */
- if (ale) {
+ if (ale && found) {
/* apply selection to keyframes */
if (/*gpl*/0) {
/* grease pencil */