aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-10-01 20:19:06 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-10-01 20:19:06 +0800
commitdb552478e46e323cccc6de094bc3fc959f08a86a (patch)
tree4098c84c8db351482441a64a42c6234fde7a2c65
parentca185d17f0ed45663616b86e4c3b5beaa8b8ff57 (diff)
downloadgsoc2013-empathy-db552478e46e323cccc6de094bc3fc959f08a86a.tar
gsoc2013-empathy-db552478e46e323cccc6de094bc3fc959f08a86a.tar.gz
gsoc2013-empathy-db552478e46e323cccc6de094bc3fc959f08a86a.tar.bz2
gsoc2013-empathy-db552478e46e323cccc6de094bc3fc959f08a86a.tar.lz
gsoc2013-empathy-db552478e46e323cccc6de094bc3fc959f08a86a.tar.xz
gsoc2013-empathy-db552478e46e323cccc6de094bc3fc959f08a86a.tar.zst
gsoc2013-empathy-db552478e46e323cccc6de094bc3fc959f08a86a.zip
Add some sanity checks. Fixes bug #463051.
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
-rw-r--r--ChangeLog5
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c2
-rw-r--r--libempathy/empathy-utils.c9
3 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fc4269adb..7a8452521 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
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.
Fixes bug #462815.
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index e8a87d173..cc8ba4f45 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -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;
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index e90521b05..e354e940d 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -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