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>2013-03-06 07:53:56 +0400
committerJoshua Leung <aligorith@gmail.com>2013-03-06 07:53:56 +0400
commitbf5eccc7281e1329ba0350bcb1b8c85cb452e8ff (patch)
tree2fb96216dcd1588041b51915bc1647b1c004d4f1 /source/blender/editors/animation/anim_channels_defines.c
parent785c26a0c33945888ea4da0095f692c92477212b (diff)
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.
Diffstat (limited to 'source/blender/editors/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 2d154ec7273..3ae8ae8a777 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -906,6 +906,10 @@ static short acf_fcurve_name_prop(bAnimListElem *ale, PointerRNA *ptr, PropertyR
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 @@ void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale
/* 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;