Fix: OffsetIndices assert with invalid span
In some cases (when there are no faces for example, the offsets span can have a size of 1 but no data). That's technically invalid and might need to be addressed more later on, but for now, just fix the assert.
This commit is contained in:
@@ -32,7 +32,7 @@ template<typename T> class OffsetIndices {
|
||||
OffsetIndices() = default;
|
||||
OffsetIndices(const Span<T> offsets) : offsets_(offsets)
|
||||
{
|
||||
BLI_assert(std::is_sorted(offsets_.begin(), offsets_.end()));
|
||||
BLI_assert(offsets_.size() < 2 || std::is_sorted(offsets_.begin(), offsets_.end()));
|
||||
}
|
||||
|
||||
/** Return the total number of elements in the referenced arrays. */
|
||||
|
||||
Reference in New Issue
Block a user