Assets/UI: Sanity check argument for UILayout.template_asset_view()
Was already doing some sanity checks, but wasn't checking if the passed property actually is a collection property, which is important.
This commit is contained in:
parent
5be54cce36
commit
49c0b9ec43
|
@ -162,6 +162,10 @@ static void asset_view_template_refresh_asset_collection(
|
|||
RNA_warning("Asset collection not found");
|
||||
return;
|
||||
}
|
||||
if (RNA_property_type(assets_prop) != PROP_COLLECTION) {
|
||||
RNA_warning("Expected a collection property");
|
||||
return;
|
||||
}
|
||||
if (!RNA_struct_is_a(RNA_property_pointer_type(&assets_dataptr, assets_prop),
|
||||
&RNA_AssetHandle)) {
|
||||
RNA_warning("Expected a collection property for AssetHandle items");
|
||||
|
|
Loading…
Reference in New Issue