summaryrefslogtreecommitdiff
path: root/framebuffer/fb_32bpp_plotters.c
diff options
context:
space:
mode:
Diffstat (limited to 'framebuffer/fb_32bpp_plotters.c')
-rw-r--r--framebuffer/fb_32bpp_plotters.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/framebuffer/fb_32bpp_plotters.c b/framebuffer/fb_32bpp_plotters.c
index 942632825..8e8f353f6 100644
--- a/framebuffer/fb_32bpp_plotters.c
+++ b/framebuffer/fb_32bpp_plotters.c
@@ -216,8 +216,10 @@ static bool fb_32bpp_text(int x, int y, const struct css_style *style,
x1 = x + (fb_font->width * length);
y1 = y + fb_font->height;
- if (!fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1))
+ if (!fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1)) {
+ free(buffer);
return true; /* text lies outside current clipping region */
+ }
/* find width and height to plot */
if (height > (y1 - y0))