Add checks for zero indexes on fill patterns to match fills. (#1638)
Co-authored-by: Bart Louwers <bart@emeel.net> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -167,7 +167,10 @@ void DrawableBuilder::setSegments(const gfx::DrawMode mode,
|
||||
gfx::IndexVectorBasePtr indexes,
|
||||
const SegmentBase* segments,
|
||||
const std::size_t segmentCount) {
|
||||
assert(indexes && indexes->elements());
|
||||
if (!indexes || !indexes->elements()) {
|
||||
assert("Missing segment indexes");
|
||||
return;
|
||||
}
|
||||
impl->sharedIndexes = std::move(indexes);
|
||||
for (std::size_t i = 0; i < segmentCount; ++i) {
|
||||
const auto& seg = segments[i];
|
||||
|
||||
Reference in New Issue
Block a user