aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 34bd39831..cdddf2d6c 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1211,6 +1211,13 @@ chat_contacts_completion_func (const gchar *s1,
gchar *tmp, *nick1, *nick2;
gint ret;
+ if (s1 == s2) {
+ return 0;
+ }
+ if (!s1 || !s2) {
+ return s1 ? -1 : +1;
+ }
+
tmp = g_utf8_normalize (s1, -1, G_NORMALIZE_DEFAULT);
nick1 = g_utf8_casefold (tmp, -1);
g_free (tmp);