summaryrefslogtreecommitdiff
path: root/gtk/gtkvruler.c
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2005-06-27 14:38:19 +0000
committerKjartan Maraas <kmaraas@src.gnome.org>2005-06-27 14:38:19 +0000
commit8eb4666ffe0caa44f85dbc3f71bb7c502116362f (patch)
tree28c115940ceebe1783f93a26dbbd39ae7cc75c60 /gtk/gtkvruler.c
parentd4c43a42ad66a324cc84384e6970305b9742621c (diff)
downloadgtk+-8eb4666ffe0caa44f85dbc3f71bb7c502116362f.tar.gz
Fix leaks Same Closes bug #308953.
2005-06-27 Kjartan Maraas <kmaraas@gnome.org> * gtk/gtkhruler.c: (gtk_hruler_draw_ticks): Fix leaks * gtk/gtkvruler.c: (gtk_vruler_draw_ticks): Same Closes bug #308953.
Diffstat (limited to 'gtk/gtkvruler.c')
-rw-r--r--gtk/gtkvruler.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkvruler.c b/gtk/gtkvruler.c
index c013aa557c..8e76e20aae 100644
--- a/gtk/gtkvruler.c
+++ b/gtk/gtkvruler.c
@@ -191,7 +191,8 @@ gtk_vruler_draw_ticks (GtkRuler *ruler)
lower = ruler->lower / ruler->metric->pixels_per_unit;
if ((upper - lower) == 0)
- return;
+goto out;
+
increment = (gdouble) width / (upper - lower);
/* determine the scale
@@ -273,6 +274,7 @@ gtk_vruler_draw_ticks (GtkRuler *ruler)
}
cairo_fill (cr);
+out:
cairo_destroy (cr);
g_object_unref (layout);