aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/egg-editable-toolbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/egg/egg-editable-toolbar.c')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 532debb1d..e7deb4129 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -794,15 +794,23 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar)
g_value_init (&value, G_TYPE_STRING);
g_object_get_property (G_OBJECT (action), "label", &value);
name = g_value_get_string (&value);
- if (name == NULL) continue;
-
+ if (name == NULL)
+ {
+ g_value_unset (&value);
+ continue;
+ }
k += g_utf8_strlen (name, -1) + 2;
if (j > 0)
{
g_string_append (string, ", ");
- if (k > 25) break;
+ if (k > 25)
+ {
+ g_value_unset (&value);
+ break;
+ }
}
g_string_append (string, name);
+ g_value_unset (&value);
}
if (j < n_items)
{