Commit f532e425 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

add g_return_if_fail().

2008-04-25  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintoptions.c (gimp_paint_options_get_jitter):
	add g_return_if_fail().

	* app/paint/gimpheal.c (gimp_heal_motion)
	* app/paint/gimpdodgeburn.c (gimp_dodge_burn_motion): free stuff
	right after it's not used any longer, instead of at the end of the
	function.

	* app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): move a
	statement to improve consistency with other motion() functions.


svn path=/trunk/; revision=25526
parent 658c5e6f
2008-04-25 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.c (gimp_paint_options_get_jitter):
add g_return_if_fail().
* app/paint/gimpheal.c (gimp_heal_motion)
* app/paint/gimpdodgeburn.c (gimp_dodge_burn_motion): free stuff
right after it's not used any longer, instead of at the end of the
function.
* app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): move a
statement to improve consistency with other motion() functions.
2008-04-25 Michael Natterer <mitch@gimp.org>
* plug-ins/print/print.c (query): fix help string of the page
......
......@@ -234,6 +234,8 @@ gimp_dodge_burn_motion (GimpPaintCore *paint_core,
else
copy_region (&tempPR, &destPR);
g_free (temp_data);
if (pressure_options->opacity)
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
......@@ -243,8 +245,6 @@ gimp_dodge_burn_motion (GimpPaintCore *paint_core,
gimp_context_get_opacity (context),
gimp_paint_options_get_brush_mode (paint_options),
GIMP_PAINT_CONSTANT);
g_free (temp_data);
}
static void
......
......@@ -531,11 +531,15 @@ gimp_heal_motion (GimpSourceCore *source_core,
/* heal tempPR using srcPR */
gimp_heal_region (&tempPR, srcPR, mask_buf);
temp_buf_free (src);
/* reinitialize tempPR */
pixel_region_init_temp_buf (&tempPR, temp, 0, 0, temp->width, temp->height);
copy_region (&tempPR, &destPR);
temp_buf_free (temp);
/* check the brush pressure */
if (paint_options->pressure_options->opacity)
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
......@@ -547,7 +551,4 @@ gimp_heal_motion (GimpSourceCore *source_core,
gimp_context_get_opacity (context),
gimp_paint_options_get_brush_mode (paint_options),
GIMP_PAINT_INCREMENTAL);
temp_buf_free (src);
temp_buf_free (temp);
}
......@@ -121,12 +121,12 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
if (opacity == 0.0)
return;
paint_appl_mode = paint_options->application_mode;
area = gimp_paint_core_get_paint_area (paint_core, drawable, paint_options);
if (! area)
return;
paint_appl_mode = paint_options->application_mode;
/* optionally take the color from the current gradient */
if (gimp_paint_options_get_gradient_color (paint_options, image,
paint_core->cur_coords.pressure,
......
......@@ -611,6 +611,8 @@ gimp_paint_options_get_jitter (GimpPaintOptions *paint_options,
{
GimpJitterOptions *jitter_options;
g_return_val_if_fail (GIMP_IS_PAINT_OPTIONS (paint_options), 0.0);
jitter_options = paint_options->jitter_options;
if (jitter_options->use_jitter)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment