NLA: add BLI_assert_msg() to check for assumption
`find_active_strip_from_listbase()` expects two lists of strips with an equal number of items. This is now not only documented, but also checked for in an assertion.
This commit is contained in:
@@ -252,6 +252,9 @@ static NlaStrip *find_active_strip_from_listbase(const NlaStrip *active_strip,
|
||||
const ListBase /* NlaStrip */ *strips_source,
|
||||
const ListBase /* NlaStrip */ *strips_dest)
|
||||
{
|
||||
BLI_assert_msg(BLI_listbase_count(strips_source) == BLI_listbase_count(strips_dest),
|
||||
"Expecting the same number of source and destination strips");
|
||||
|
||||
NlaStrip *strip_dest = strips_dest->first;
|
||||
LISTBASE_FOREACH (const NlaStrip *, strip_source, strips_source) {
|
||||
if (strip_dest == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user