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-01-26 19:21:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-26 19:21:54 +0300
commit1efb22c2e607bd3fcb416e952dbf6c3a9f6516d0 (patch)
tree1ce26b33c07935aa1cdffec20b825f86f592ab4e /source/blender/editors/space_image
parent2df908df39761e0ebfad92d1eafb112c81a4c456 (diff)
fix from andguent on irc, wasn't checking for property type.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_buttons.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 7509903246b..e68d9f66986 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -781,15 +781,21 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
if(!ptr->data)
return;
-
+
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
printf("uiTemplateImage: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
return;
}
+ if(RNA_property_type(prop) != PROP_POINTER) {
+ printf("uiTemplateImage: expected pointer property for %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ return;
+ }
+
block= uiLayoutGetBlock(layout);
+
imaptr= RNA_property_pointer_get(ptr, prop);
ima= imaptr.data;
iuser= userptr->data;