[gimp] libgimpwidgets: don't pass around uninitialized memory in GimpRuler
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets: don't pass around uninitialized memory in GimpRuler
- Date: Sun, 6 Feb 2011 10:31:18 +0000 (UTC)
commit 4fd56d96404f293a3e3ae7bd05ba4a725325e005
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 6 02:35:52 2011 +0100
libgimpwidgets: don't pass around uninitialized memory in GimpRuler
libgimpwidgets/gimpruler.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/libgimpwidgets/gimpruler.c b/libgimpwidgets/gimpruler.c
index 8d3e22e..74db7fc 100644
--- a/libgimpwidgets/gimpruler.c
+++ b/libgimpwidgets/gimpruler.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]