libgimpcolor: Add an assert at start of gimp_render_sub_pixel()

This is to replace the old checks which were removed in
commit ff6727ae66.
This commit is contained in:
Mukund Sivaraman 2011-10-13 10:22:32 +05:30
parent c4be5b1a4f
commit 5b7cd667f2
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@ gimp_render_sub_pixel (gint max_depth,
gulong num_samples = 0; gulong num_samples = 0;
gint cnt; gint cnt;
g_return_val_if_fail (render_func != NULL, 0);
/* Get offsets for corners */ /* Get offsets for corners */
dx1 = (gdouble) (x1 - sub_pixel_size / 2) / sub_pixel_size; dx1 = (gdouble) (x1 - sub_pixel_size / 2) / sub_pixel_size;