summaryrefslogtreecommitdiff
path: root/gtk/gtkcurve.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>1998-05-04 02:59:52 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-05-04 02:59:52 +0000
commit2780a82a0e33437e27ef392ac0a0e724d8ca31df (patch)
tree7f1d77d9d875caf931fdca26e3bd04e3a38348a6 /gtk/gtkcurve.c
parentd142827b34d15ae3f85c8b7d7d1fa5ec55171fe7 (diff)
downloadgtk+-2780a82a0e33437e27ef392ac0a0e724d8ca31df.tar.gz
One or two trivial changes from the gtk-1-0 branch.
Diffstat (limited to 'gtk/gtkcurve.c')
-rw-r--r--gtk/gtkcurve.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkcurve.c b/gtk/gtkcurve.c
index 345925b0f7..169c885bbf 100644
--- a/gtk/gtkcurve.c
+++ b/gtk/gtkcurve.c
@@ -294,6 +294,9 @@ gtk_curve_graph_events (GtkWidget *widget, GdkEvent *event, GtkCurve *c)
width = w->allocation.width - RADIUS * 2;
height = w->allocation.height - RADIUS * 2;
+ if ((width < 0) || (height < 0))
+ return FALSE;
+
/* get the pointer position */
gdk_window_get_pointer (w->window, &tx, &ty, NULL);
x = CLAMP ((tx - RADIUS), 0, width-1);