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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-10-06 20:00:56 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-10-06 20:00:56 +0400
commit29bb5f9a692dacec82cab6fe85ea61751caea1e0 (patch)
treedef3934ff8ca3feed59b5adc85d9414a0de00dab /source/blender/blenkernel/intern/fcurve.c
parent8cb1b35bee80f52e8957ee8855f0a4624b8ad333 (diff)
Fix Cycles crashing with previous own commit.
Behavior with NULL context was wrong.
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r--source/blender/blenkernel/intern/fcurve.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index de6e6c53353..e90a0891436 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -325,10 +325,10 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro
/* there must be some RNA-pointer + property combon */
if (prop && tptr.id.data && RNA_property_animateable(&tptr, prop)) {
AnimData *adt = BKE_animdata_from_id(tptr.id.data);
- int step = 2;
+ int step = C ? 2 : 1; /* Always 1 in case we have no context (can't check in 'ancestors' of given RNA ptr). */
char *path = NULL;
- if (adt == NULL) {
+ if (!adt && C) {
path = BKE_animdata_driver_path_hack(C, &tptr, prop, NULL);
adt = BKE_animdata_from_id(tptr.id.data);
step--;