libgimpwidgets: don't pass around uninitialized memory in GimpRuler

This commit is contained in:
Michael Natterer 2011-02-06 02:35:52 +01:00
parent e309d3cdf8
commit 4fd56d9640
1 changed files with 6 additions and 5 deletions

View File

@ -472,11 +472,12 @@ gimp_ruler_track_widget_motion_notify (GtkWidget *widget,
mevent->x, mevent->y,
&widget_x, &widget_y);
gtk_widget_translate_coordinates (widget, GTK_WIDGET (ruler),
widget_x, widget_y,
&ruler_x, &ruler_y);
gimp_ruler_update_position (ruler, ruler_x, ruler_y);
if (gtk_widget_translate_coordinates (widget, GTK_WIDGET (ruler),
widget_x, widget_y,
&ruler_x, &ruler_y))
{
gimp_ruler_update_position (ruler, ruler_x, ruler_y);
}
return FALSE;
}