From 15d25114cac4436c1017972001a38fa544461789 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Mon, 29 Oct 2007 20:03:25 +0000 Subject: [PATCH] return with a warning if called with NULL render_func or put_pixel_func. 2007-10-29 Sven Neumann * libgimpcolor/gimpadaptivesupersample.c (gimp_adaptive_supersample_area): return with a warning if called with NULL render_func or put_pixel_func. svn path=/trunk/; revision=23985 --- ChangeLog | 6 ++++++ libgimpcolor/gimpadaptivesupersample.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 94a2f1b618..8cf63fc04b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-29 Sven Neumann + + * libgimpcolor/gimpadaptivesupersample.c + (gimp_adaptive_supersample_area): return with a warning if called + with NULL render_func or put_pixel_func. + 2007-10-29 Sven Neumann Fix bug #491272 (no cursor drawn for small brush sizes): diff --git a/libgimpcolor/gimpadaptivesupersample.c b/libgimpcolor/gimpadaptivesupersample.c index 5e8bf798f8..ef8ba83104 100644 --- a/libgimpcolor/gimpadaptivesupersample.c +++ b/libgimpcolor/gimpadaptivesupersample.c @@ -253,6 +253,9 @@ gimp_adaptive_supersample_area (gint x1, GimpSampleType **block; /* Sample block matrix */ gulong num_samples; + g_return_val_if_fail (render_func != NULL, 0); + g_return_val_if_fail (put_pixel_func != NULL, 0); + /* Initialize color */ gimp_rgba_set (&color, 0.0, 0.0, 0.0, 0.0);