mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +00:00
LibGfx: Don't crash on request to draw impossible circle segment
The previous VERIFY_NOT_REACHED() could be reached when there were equal coodinates. This could be the case for a small radius which lead to rounding making the two coordinates equal.
This commit is contained in:
parent
401ea85655
commit
3cc6ffd4a6
1 changed files with 2 additions and 2 deletions
|
@ -131,8 +131,8 @@ void Box::paint_border(PaintContext& context)
|
||||||
circle_position.set_y(to.y());
|
circle_position.set_y(to.y());
|
||||||
center.set_x(radius);
|
center.set_x(radius);
|
||||||
} else {
|
} else {
|
||||||
// How did you get here?
|
// You are lying about your intentions of drawing a quarter circle, your coordinates are (partly) the same!
|
||||||
VERIFY_NOT_REACHED();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gfx::IntRect circle_rect = {
|
Gfx::IntRect circle_rect = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue