projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
203685a
)
gsk: Add an assertion to help static analysis
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 18 Nov 2022 05:02:20 +0000
(
00:02
-0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 18 Nov 2022 05:04:23 +0000
(
00:04
-0500)
clang gets wild ideas about negative radii otherwise.
gsk/gskrendernodeimpl.c
patch
|
blob
|
history
diff --git
a/gsk/gskrendernodeimpl.c
b/gsk/gskrendernodeimpl.c
index 286269ec15aaa55252f264a906361a09ddce7f97..a797bafb4940d8b80d9d1a088c684aaafc46a0d5 100644
(file)
--- 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);