[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26222] trunk/blender/source/blender/ editors/animation/anim_channels_edit.c: Bugfix #20664: NLA Editor - Hiding stuff causes instant crash ..
Joshua Leung
aligorith at gmail.com
Sun Jan 24 11:18:17 CET 2010
Revision: 26222
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26222
Author: aligorith
Date: 2010-01-24 11:18:16 +0100 (Sun, 24 Jan 2010)
Log Message:
-----------
Bugfix #20664: NLA Editor - Hiding stuff causes instant crash ..
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/anim_channels_edit.c
Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_edit.c 2010-01-24 09:58:30 UTC (rev 26221)
+++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c 2010-01-24 10:18:16 UTC (rev 26222)
@@ -372,6 +372,10 @@
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 @@
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 @@
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 @@
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
*/
More information about the Bf-blender-cvs
mailing list