From: Matthias Clasen Date: Fri, 18 Nov 2022 05:02:20 +0000 (-0500) Subject: gsk: Add an assertion to help static analysis X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~9^2~92^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ce57150203f8b8fa4527984f178cac8496d8afa9;p=gtk4.git gsk: Add an assertion to help static analysis clang gets wild ideas about negative radii otherwise. --- 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);