diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-06 03:52:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-06 03:53:41 +0400 |
commit | d74d6c7c1d18edfd4d066f59743dc82a3145c5b2 (patch) | |
tree | 70de17040a7bb23294e9c67fc6d8d1318e44830a /source | |
parent | 4b9fb83e674e36acf7d241e60367a2b9d8821a1c (diff) |
Fix T37710: Missing bounds check for active UI list item could crash.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index db62cf81cbb..ff458041813 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2971,7 +2971,9 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co case UILST_LAYOUT_COMPACT: row = uiLayoutRow(layout, TRUE); - if (dataptr->data && prop && dyn_data->items_shown > 0) { + if ((dataptr->data && prop) && (dyn_data->items_shown > 0) && + (activei >= 0) && (activei < dyn_data->items_shown)) + { PointerRNA *itemptr = &items_ptr[activei].item; int org_i = items_ptr[activei].org_idx; |