From 02ebd448519cf3b682419cf452376397d4668610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 24 Jul 2010 13:02:31 +0200 Subject: [PATCH] [shadows] Fix shadows with small blur radius There's an assertion in calculate_gaussian_kernel() to avoid a division by zero - due to an unnecessary cast from float to int this assertion is triggered incorrectly for small (but non-zero) values, e.g. a blur radius of 1px. --- src/st/st-theme-node-drawing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c index 46d9de72f..5bd41c7f9 100644 --- a/src/st/st-theme-node-drawing.c +++ b/src/st/st-theme-node-drawing.c @@ -50,7 +50,7 @@ calculate_gaussian_kernel (gdouble sigma, gdouble exp_divisor; gint half, i; - g_return_val_if_fail ((int) sigma > 0, NULL); + g_return_val_if_fail (sigma > 0, NULL); half = n_values / 2;