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-01-24 13:18:16 +0300
committerJoshua Leung <aligorith@gmail.com>2010-01-24 13:18:16 +0300
commit7c21eb7cd560fc62807ad8182a7b10635bc7d845 (patch)
tree4357adf1e7d817aa25fc7a2c33a5832971bada90 /source/blender/editors/animation
parentb4640bf4198d0caf0bd8ef2186710008934e8b1d (diff)
Bugfix #20664: NLA Editor - Hiding stuff causes instant crash ..
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 9c72ff1a413..f756c5b3158 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -372,6 +372,10 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
bAnimListElem *ale, *match=NULL;
int prevLevel=0, matchLevel=0;
+ /* sanity check */
+ if (ELEM(NULL, anim_data, anim_data->first))
+ return;
+
/* find the channel that got changed */
for (ale= anim_data->first; ale; ale= ale->next) {
/* compare data, and type as main way of identifying the channel */
@@ -391,6 +395,11 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
else {
bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale_setting);
+ if (acf == NULL) {
+ printf("ERROR: no channel info for the changed channel \n");
+ return;
+ }
+
/* get the level of the channel that was affected
* - we define the level as simply being the offset for the start of the channel
*/
@@ -416,6 +425,10 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
int level;
+ /* if no channel info was found, skip, since this type might not have any useful info */
+ if (acf == NULL)
+ continue;
+
/* get the level of the current channel traversed
* - we define the level as simply being the offset for the start of the channel
*/
@@ -445,6 +458,10 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
int level;
+ /* if no channel info was found, skip, since this type might not have any useful info */
+ if (acf == NULL)
+ continue;
+
/* get the level of the current channel traversed
* - we define the level as simply being the offset for the start of the channel
*/