Commit 941c3de3 authored by Xavier Claessens's avatar Xavier Claessens

Use g_return_[val]_if_fail instead of g_assert in public APIs.

svn path=/trunk/; revision=2097
parent 4e5ed70e
......@@ -585,7 +585,7 @@ empathy_account_manager_get_connected_accounts (EmpathyAccountManager *manager)
{
EmpathyAccountManagerPriv *priv;
g_assert (EMPATHY_IS_ACCOUNT_MANAGER (manager));
g_return_val_if_fail (EMPATHY_IS_ACCOUNT_MANAGER (manager), 0);
priv = GET_PRIV (manager);
......@@ -597,7 +597,7 @@ empathy_account_manager_get_connecting_accounts (EmpathyAccountManager *manager)
{
EmpathyAccountManagerPriv *priv;
g_assert (EMPATHY_IS_ACCOUNT_MANAGER (manager));
g_return_val_if_fail (EMPATHY_IS_ACCOUNT_MANAGER (manager), 0);
priv = GET_PRIV (manager);
......@@ -611,7 +611,7 @@ empathy_account_manager_is_account_just_connected (EmpathyAccountManager *manage
EmpathyAccountManagerPriv *priv;
AccountData *data;
g_assert (EMPATHY_IS_ACCOUNT_MANAGER (manager));
g_return_val_if_fail (EMPATHY_IS_ACCOUNT_MANAGER (manager), FALSE);
priv = GET_PRIV (manager);
data = g_hash_table_lookup (priv->accounts, account);
......
......@@ -391,8 +391,8 @@ empathy_contact_monitor_set_proxy (EmpathyContactMonitor *self,
{
EmpathyContactMonitorPriv *priv;
g_assert (EMPATHY_IS_CONTACT_MONITOR (self));
g_assert (EMPATHY_IS_CONTACT_LIST (proxy));
g_return_if_fail (EMPATHY_IS_CONTACT_MONITOR (self));
g_return_if_fail (EMPATHY_IS_CONTACT_LIST (proxy));
priv = GET_PRIV (self);
......@@ -416,7 +416,7 @@ empathy_contact_monitor_new_for_proxy (EmpathyContactList *proxy)
{
EmpathyContactMonitor *retval;
g_assert (EMPATHY_IS_CONTACT_LIST (proxy));
g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST (proxy), NULL);
retval = g_object_new (EMPATHY_TYPE_CONTACT_MONITOR,
"proxy", proxy, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment