diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-10-01 17:26:27 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-10-01 17:26:27 +0800 |
commit | db94fca28c28e0025d8d36bd5e4048a6213b482e (patch) | |
tree | a959f87e2b0148fa37ea0ec54991c846e025a438 | |
parent | 25d8783e9f0a72dcd2210b9f4ec0dbc7994140a6 (diff) | |
download | gsoc2013-empathy-db94fca28c28e0025d8d36bd5e4048a6213b482e.tar gsoc2013-empathy-db94fca28c28e0025d8d36bd5e4048a6213b482e.tar.gz gsoc2013-empathy-db94fca28c28e0025d8d36bd5e4048a6213b482e.tar.bz2 gsoc2013-empathy-db94fca28c28e0025d8d36bd5e4048a6213b482e.tar.lz gsoc2013-empathy-db94fca28c28e0025d8d36bd5e4048a6213b482e.tar.xz gsoc2013-empathy-db94fca28c28e0025d8d36bd5e4048a6213b482e.tar.zst gsoc2013-empathy-db94fca28c28e0025d8d36bd5e4048a6213b482e.zip |
empathy_account_settings_set_*: check arguments
-rw-r--r-- | libempathy/empathy-account-settings.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c index 9643920cb..29ff3f1b7 100644 --- a/libempathy/empathy-account-settings.c +++ b/libempathy/empathy-account-settings.c @@ -894,6 +894,9 @@ empathy_account_settings_set_string (EmpathyAccountSettings *settings, { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); + g_return_if_fail (param != NULL); + g_return_if_fail (value != NULL); + tp_asv_set_string (priv->parameters, g_strdup (param), value); account_settings_remove_from_unset (settings, param); @@ -906,6 +909,9 @@ empathy_account_settings_set_strv (EmpathyAccountSettings *settings, { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); + g_return_if_fail (param != NULL); + g_return_if_fail (value != NULL); + tp_asv_set_strv (priv->parameters, g_strdup (param), value); account_settings_remove_from_unset (settings, param); @@ -918,6 +924,8 @@ empathy_account_settings_set_int32 (EmpathyAccountSettings *settings, { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); + g_return_if_fail (param != NULL); + tp_asv_set_int32 (priv->parameters, g_strdup (param), value); account_settings_remove_from_unset (settings, param); @@ -930,6 +938,8 @@ empathy_account_settings_set_int64 (EmpathyAccountSettings *settings, { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); + g_return_if_fail (param != NULL); + tp_asv_set_int64 (priv->parameters, g_strdup (param), value); account_settings_remove_from_unset (settings, param); @@ -942,6 +952,8 @@ empathy_account_settings_set_uint32 (EmpathyAccountSettings *settings, { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); + g_return_if_fail (param != NULL); + tp_asv_set_uint32 (priv->parameters, g_strdup (param), value); account_settings_remove_from_unset (settings, param); @@ -954,6 +966,8 @@ empathy_account_settings_set_uint64 (EmpathyAccountSettings *settings, { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); + g_return_if_fail (param != NULL); + tp_asv_set_uint64 (priv->parameters, g_strdup (param), value); account_settings_remove_from_unset (settings, param); @@ -966,6 +980,8 @@ empathy_account_settings_set_boolean (EmpathyAccountSettings *settings, { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); + g_return_if_fail (param != NULL); + tp_asv_set_boolean (priv->parameters, g_strdup (param), value); account_settings_remove_from_unset (settings, param); @@ -1002,6 +1018,8 @@ empathy_account_settings_set_display_name_async ( EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); GSimpleAsyncResult *result; + g_return_if_fail (name != NULL); + result = g_simple_async_result_new (G_OBJECT (settings), callback, user_data, empathy_account_settings_set_display_name_finish); @@ -1076,6 +1094,8 @@ empathy_account_settings_set_icon_name_async ( EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); GSimpleAsyncResult *result; + g_return_if_fail (name != NULL); + result = g_simple_async_result_new (G_OBJECT (settings), callback, user_data, empathy_account_settings_set_icon_name_finish); |