diff options
Diffstat (limited to 'frontends/cocoa/plotter.m')
-rw-r--r-- | frontends/cocoa/plotter.m | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m index f91167701..72577da1a 100644 --- a/frontends/cocoa/plotter.m +++ b/frontends/cocoa/plotter.m @@ -133,6 +133,11 @@ static nserror plot_clip(const struct redraw_context *ctx, const struct rect *cl void cocoa_plot_render_path(NSBezierPath *path, const plot_style_t *pstyle) { + // Quick exit if the clip rect has a zero size. Core Graphics doesn’t like that. + if (cocoa_plot_clip_rect.size.width == 0 || cocoa_plot_clip_rect.size.height == 0) { + return; + } + [NSGraphicsContext saveGraphicsState]; [NSBezierPath clipRect:cocoa_plot_clip_rect]; @@ -203,7 +208,7 @@ static nserror plot_path(const struct redraw_context *ctx, const plot_style_t *p return NSERROR_OK; if (*p != PLOTTER_PATH_MOVE) { - LOG("Path does not start with move"); + NSLOG(netsurf, INFO, "Path does not start with move"); return NSERROR_INVALID; } @@ -238,7 +243,7 @@ static nserror plot_path(const struct redraw_context *ctx, const plot_style_t *p break; default: - LOG("Invalid path"); + NSLOG(netsurf, INFO, "Invalid path"); return NSERROR_INVALID; } } |