From ce57150203f8b8fa4527984f178cac8496d8afa9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 18 Nov 2022 00:02:20 -0500 Subject: gsk: Add an assertion to help static analysis clang gets wild ideas about negative radii otherwise. --- gsk/gskrendernodeimpl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gsk/gskrendernodeimpl.c') diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 286269ec15..a797bafb49 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -4818,6 +4818,8 @@ blur_image_surface (cairo_surface_t *surface, int radius, int iterations) cairo_surface_t *tmp; int width, height; + g_assert (radius >= 0); + width = cairo_image_surface_get_width (surface); height = cairo_image_surface_get_height (surface); tmp = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); -- cgit v1.2.1