diff options
-rw-r--r-- | libindicate/listener.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libindicate/listener.c b/libindicate/listener.c index fddeb71..bd3639d 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1003,6 +1003,10 @@ interest_cb (DBusGProxy *proxy, GError *error, gpointer userdata) void indicate_listener_server_show_interest (IndicateListener * listener, IndicateListenerServer * server, IndicateInterests interest) { + if (!(interest > INDICATE_INTEREST_NONE && interest < INDICATE_INTEREST_LAST)) { + return; + } + if (!server->interests[interest]) { org_freedesktop_indicator_show_interest_async (server->proxy, interest_to_string(interest), interest_cb, server); server->interests[interest] = TRUE; |