]> git.0d.be Git - empathy.git/commitdiff
Add some sanity checks. Fixes bug #463051.
authorXavier Claessens <xclaesse@gmail.com>
Mon, 1 Oct 2007 12:19:06 +0000 (12:19 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 1 Oct 2007 12:19:06 +0000 (12:19 +0000)
2007-10-01  Xavier Claessens  <xclaesse@gmail.com>

* libempathy-gtk/empathy-accounts-dialog.c:
* libempathy/empathy-utils.c: Add some sanity checks. Fixes bug #463051.

svn path=/trunk/; revision=348

ChangeLog
libempathy-gtk/empathy-accounts-dialog.c
libempathy/empathy-utils.c

index fc4269adbaa39eb6e3792a5391c28a2c36e246db..7a8452521cb59e6a3dca99f396b699e0e806fbb1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-01  Xavier Claessens  <xclaesse@gmail.com>
+
+       * libempathy-gtk/empathy-accounts-dialog.c:
+       * libempathy/empathy-utils.c: Add some sanity checks. Fixes bug #463051.
+
 2007-10-01  Xavier Claessens  <xclaesse@gmail.com>
 
        * libempathy/empathy-tp-chat.c: Disconnect all signals in finalize.
index e8a87d173463242533ba06af9f387213e4782849..cc8ba4f455c2e7b1d232e63e2e33048a5a70731a 100644 (file)
@@ -700,7 +700,7 @@ accounts_dialog_status_changed_cb (MissionControl                  *mc,
                                   McPresence                       presence,
                                   TelepathyConnectionStatusReason  reason,
                                   const gchar                     *unique_name,
-                                  EmpathyAccountsDialog            *dialog)
+                                  EmpathyAccountsDialog           *dialog)
 {
        GtkTreeView      *view;
        GtkTreeSelection *selection;
index e90521b05984591e03702c2a4eafd72f1490c904..e354e940d64594138125490f036b29f6816975af 100644 (file)
@@ -369,16 +369,21 @@ empathy_xml_node_find_child_prop_value (xmlNodePtr   node,
 guint
 empathy_account_hash (gconstpointer key)
 {
+       g_return_val_if_fail (MC_IS_ACCOUNT (key), 0);
+
        return g_str_hash (mc_account_get_unique_name (MC_ACCOUNT (key)));
 }
 
 gboolean
 empathy_account_equal (gconstpointer a,
-                     gconstpointer b)
+                      gconstpointer b)
 {
        const gchar *name_a;
        const gchar *name_b;
 
+       g_return_val_if_fail (MC_IS_ACCOUNT (a), FALSE);
+       g_return_val_if_fail (MC_IS_ACCOUNT (b), FALSE);
+
        name_a = mc_account_get_unique_name (MC_ACCOUNT (a));
        name_b = mc_account_get_unique_name (MC_ACCOUNT (b));
 
@@ -476,6 +481,8 @@ empathy_call_contact (EmpathyContact *contact)
        EmpathyTpGroup *group;
        GError         *error;
 
+       g_return_if_fail (EMPATHY_IS_CONTACT (contact));
+
        /* StreamedMedia channels must have handle=0 and handle_type=none.
         * To call a contact we have to add him in the group interface of the
         * channel. MissionControl will detect the channel creation and