|
@@ -2755,11 +2755,13 @@ static int RenderLineBresenham(SDL_Renderer *renderer, int x1, int y1, int x2, i
|
|
|
int retval;
|
|
|
SDL_bool isstack;
|
|
|
SDL_FPoint *points;
|
|
|
+ SDL_Rect viewport;
|
|
|
|
|
|
/* the backend might clip this further to the clipping rect, but we
|
|
|
just want a basic safety against generating millions of points for
|
|
|
massive lines. */
|
|
|
- if (!SDL_GetRectAndLineIntersection(&renderer->view->viewport, &x1, &y1, &x2, &y2)) {
|
|
|
+ GetRenderViewportInPixels(renderer, &viewport);
|
|
|
+ if (!SDL_GetRectAndLineIntersection(&viewport, &x1, &y1, &x2, &y2)) {
|
|
|
return 0;
|
|
|
}
|
|
|
|