fixed potential crash when rendering SVG

This commit is contained in:
Zeno Rogue
2026-09-17 09:37:51 +02:00
parent bfe7fb4c7b
commit 21f50a4d6c
+4 -1
View File
@@ -2128,11 +2128,14 @@ void dqi_poly::draw() {
#if CAP_SVG
if(svg::in) {
if(isize(glcoords) > POLYMAX) continue;
bool bad = false;
for(int i=0; i<polyi; i++) if(isnan(glcoords[i][0]) || isnan(glcoords[i][1]) || isnan(glcoords[i][2])) bad = true;
for(int i=0; i<isize(glcoords); i++) if(isnan(glcoords[i][0]) || isnan(glcoords[i][1]) || isnan(glcoords[i][2])) bad = true;
if(bad) continue;
coords_to_poly();
color_t col = color;
if(poly_flags & POLY_INVERSE) col = 0;
if(poly_flags & POLY_TRIANGLES) {