[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55073] trunk/blender/source/blender/ editors/animation/anim_channels_defines.c: Woops! Fix for previous F-Curve path fix commit
Joshua Leung
aligorith at gmail.com
Wed Mar 6 04:53:57 CET 2013
Revision: 55073
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55073
Author: aligorith
Date: 2013-03-06 03:53:56 +0000 (Wed, 06 Mar 2013)
Log Message:
-----------
Woops! Fix for previous F-Curve path fix commit
Trying to rename a valid F-Curve would crash as no RNA property was set, but
*prop still had an uninitialised value.
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/anim_channels_defines.c
Modified: trunk/blender/source/blender/editors/animation/anim_channels_defines.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_defines.c 2013-03-06 02:57:31 UTC (rev 55072)
+++ trunk/blender/source/blender/editors/animation/anim_channels_defines.c 2013-03-06 03:53:56 UTC (rev 55073)
@@ -906,6 +906,10 @@
RNA_pointer_create(ale->id, &RNA_FCurve, ale->data, ptr);
*prop = RNA_struct_find_property(ptr, "data_path");
}
+ else {
+ /* for "normal" F-Curves - no editable name, but *prop may not be set properly yet... */
+ *prop = NULL;
+ }
return (*prop != NULL);
}
@@ -3422,10 +3426,13 @@
/* if rename index matches, add widget for this */
if (ac->ads->renameIndex == channel_index + 1) {
- PointerRNA ptr;
- PropertyRNA *prop;
+ PointerRNA ptr = {{NULL}};
+ PropertyRNA *prop = NULL;
- /* draw renaming widget if we can get RNA pointer for it */
+ /* draw renaming widget if we can get RNA pointer for it
+ * NOTE: property may only be available in some cases, even if we have
+ * a callback available (e.g. broken F-Curve rename)
+ */
if (acf->name_prop(ale, &ptr, &prop)) {
uiBut *but;
More information about the Bf-blender-cvs
mailing list