From 0f452943d7f90ba021cd16c8bafcfcb284268e09 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Mon, 9 Apr 2012 09:28:40 +0200 Subject: fix memory leak and some minor things (bzr r11190) --- src/widgets/gradient-toolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/gradient-toolbar.cpp') diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index e5a3ab155..e239457fd 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -175,7 +175,6 @@ gboolean gr_vector_list(GtkWidget *combo_box, SPDesktop *desktop, bool selection gl = g_slist_reverse (gl); guint pos = 0; - guint idx = 0; if (!gl) { // The document has no gradients @@ -205,6 +204,7 @@ gboolean gr_vector_list(GtkWidget *combo_box, SPDesktop *desktop, bool selection sensitive = FALSE; } + guint idx = 0; while (gl) { SPGradient *gradient = SP_GRADIENT (gl->data); gl = g_slist_remove (gl, gradient); -- cgit v1.2.3