mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
LibGfx: Abort draw_circle_arc_intersecting with 0 radius
In testing a particular website (https://www.icpms.com), WebContent was crashing with infinite recursion in draw_circle_arc_intersecting. Presumably, radius must be > 0 to paint something, so this trivial patch simply returns if radius <= 0. The website in question no longer crashes WebContent.
This commit is contained in:
parent
83609adbdf
commit
2632f6ae65
1 changed files with 1 additions and 1 deletions
|
@ -428,7 +428,7 @@ void Painter::fill_rounded_corner(IntRect const& a_rect, int radius, Color color
|
||||||
|
|
||||||
void Painter::draw_circle_arc_intersecting(IntRect const& a_rect, IntPoint const& center, int radius, Color color, int thickness)
|
void Painter::draw_circle_arc_intersecting(IntRect const& a_rect, IntPoint const& center, int radius, Color color, int thickness)
|
||||||
{
|
{
|
||||||
if (thickness <= 0)
|
if (thickness <= 0 || radius <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Care about clipping
|
// Care about clipping
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue