2.5:
authorNicholas Bishop <nicholasbishop@gmail.com>
Sun, 16 Aug 2009 21:05:57 +0000 (21:05 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Sun, 16 Aug 2009 21:05:57 +0000 (21:05 +0000)
Fixed a crasher reported in IRC by DingTo (bad pointer dereference)

source/blender/editors/interface/interface_templates.c

index d5df03e151af0aa62919cf8c4778a8f80d31eb5d..1a5c11789831d08f18ec4b93b44092bf73e3fc46 100644 (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);