Fixed a crasher reported in IRC by DingTo (bad pointer dereference)
This commit is contained in:
Nicholas Bishop
2009-08-16 21:05:57 +00:00
parent 6a6d304033
commit 64fb0667b2

View File

@@ -1453,7 +1453,8 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
/* init numbers */
RNA_property_int_range(activeptr, activeprop, &min, &max);
len= RNA_property_collection_length(ptr, prop);
if(prop)
len= RNA_property_collection_length(ptr, prop);
items= CLAMPIS(len, rows, 5);
pa->list_scroll= MIN2(pa->list_scroll, len-items);