💥Fix Crash with painted Line in some corrupted models (#12806)

Safeguard EdgeGrid.hpp
This commit is contained in:
Rodrigo Faselli
2026-04-07 11:22:43 -03:00
committed by GitHub
parent 2829b8eabb
commit 9478af93e4

View File

@@ -224,6 +224,8 @@ public:
iy += 1;
assert(iy <= iyb);
}
if (ix < 0 || iy < 0 || ix >= (int64_t)m_cols || iy >= (int64_t)m_rows)
return;
if (! visitor(iy, ix))
return;
} while (ix != ixb || iy != iyb);
@@ -245,6 +247,8 @@ public:
iy -= 1;
assert(iy >= iyb);
}
if (ix < 0 || iy < 0 || ix >= (int64_t)m_cols || iy >= (int64_t)m_rows)
return;
if (! visitor(iy, ix))
return;
} while (ix != ixb || iy != iyb);
@@ -270,6 +274,8 @@ public:
iy += 1;
assert(iy <= iyb);
}
if (ix < 0 || iy < 0 || ix >= (int64_t)m_cols || iy >= (int64_t)m_rows)
return;
if (! visitor(iy, ix))
return;
} while (ix != ixb || iy != iyb);
@@ -307,6 +313,8 @@ public:
iy -= 1;
assert(iy >= iyb);
}
if (ix < 0 || iy < 0 || ix >= (int64_t)m_cols || iy >= (int64_t)m_rows)
return;
if (! visitor(iy, ix))
return;
} while (ix != ixb || iy != iyb);