diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-10-02 12:21:47 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-10-02 12:21:47 +0200 |
commit | d80040726cf55f4f65a7353baff4cf864d981b17 (patch) | |
tree | 39df77f838b3b1ecfbcaf8c11bf9c5460dc96e54 | |
parent | 13f25057e36d445e650f45f1d835d43de405355c (diff) | |
download | ayatana-indicator-messages-d80040726cf55f4f65a7353baff4cf864d981b17.tar.gz ayatana-indicator-messages-d80040726cf55f4f65a7353baff4cf864d981b17.tar.bz2 ayatana-indicator-messages-d80040726cf55f4f65a7353baff4cf864d981b17.zip |
messages-service.c: return FALSE from set_status() if preconditions aren't met
-rw-r--r-- | src/messages-service.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/messages-service.c b/src/messages-service.c index 04e4fc6..2a5f3fd 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -99,11 +99,12 @@ set_status (IndicatorMessagesService *service, GDesktopAppInfo *appinfo; const gchar *id; - g_return_if_fail (g_str_equal (status_str, "available") || - g_str_equal (status_str, "away")|| - g_str_equal (status_str, "busy") || - g_str_equal (status_str, "invisible") || - g_str_equal (status_str, "offline")); + g_return_val_if_fail (g_str_equal (status_str, "available") || + g_str_equal (status_str, "away")|| + g_str_equal (status_str, "busy") || + g_str_equal (status_str, "invisible") || + g_str_equal (status_str, "offline"), + FALSE); appinfo = g_desktop_app_info_new (desktop_id); if (!appinfo) { |