aboutsummaryrefslogtreecommitdiff
path: root/libindicate
diff options
context:
space:
mode:
Diffstat (limited to 'libindicate')
-rw-r--r--libindicate/server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libindicate/server.c b/libindicate/server.c
index 17db3dc..48f1c71 100644
--- a/libindicate/server.c
+++ b/libindicate/server.c
@@ -230,6 +230,11 @@ get_desktop (IndicateServer * server, gchar ** desktop_path, GError **error)
static gboolean
get_indicator_count (IndicateServer * server, guint * count, GError **error)
{
+ guint lstcnt = g_slist_length(server->indicators);
+
+ g_return_val_if_fail(server->num_hidden < lstcnt, TRUE);
+
+ *count = lstcnt - server->num_hidden;
return TRUE;
}