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:
authorCampbell Barton <ideasman42@gmail.com>2011-08-14 14:28:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-14 14:28:18 +0400
commit540f0c64b5d42186119a1e1ccdd9aac7edd13960 (patch)
tree213c67826b98070a88de64607dc91592cc0d1b1b /source/blender/blenkernel
parent62fdee3d8ae7ea37ed42fc655058c2bf03b38be8 (diff)
add in asserts for when array/non array RNA funcions are used incorrectly, would have made previous fix a lot easier to find.
also remove unused argument from RNA_property_array_check.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/fcurve.c2
-rw-r--r--source/blender/blenkernel/intern/node.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index d6a9d950015..13e13fbc3ff 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -1002,7 +1002,7 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar)
/* get property to read from, and get value as appropriate */
if (RNA_path_resolve_full(&id_ptr, dtar->rna_path, &ptr, &prop, &index)) {
- if(RNA_property_array_check(&ptr, prop)) {
+ if(RNA_property_array_check(prop)) {
/* array */
if (index < RNA_property_array_length(&ptr, prop)) {
switch (RNA_property_type(prop)) {
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 13469e0b58b..5f1a6c911bc 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -3243,7 +3243,7 @@ static int node_animation_properties(bNodeTree *ntree, bNode *node)
int driven, len=1, index;
prop = (PropertyRNA *)link;
- if (RNA_property_array_check(&ptr, prop))
+ if (RNA_property_array_check(prop))
len = RNA_property_array_length(&ptr, prop);
for (index=0; index<len; index++) {
@@ -3261,7 +3261,7 @@ static int node_animation_properties(bNodeTree *ntree, bNode *node)
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
prop = RNA_struct_find_property(&ptr, "default_value");
- if (RNA_property_array_check(&ptr, prop))
+ if (RNA_property_array_check(prop))
len = RNA_property_array_length(&ptr, prop);
for (index=0; index<len; index++) {