aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-05-03 02:27:13 +0800
committerXavier Claessens <xclaesse@gmail.com>2011-05-03 02:27:13 +0800
commite3a4b93a1e7ec0fd3aa87818189bd87710645257 (patch)
tree2adb3112edc90d9ce6b5df121a363b0f9921cc0e /libempathy-gtk
parente9ef0cff07611187f2230b08e396fc1637e14ec8 (diff)
downloadgsoc2013-empathy-e3a4b93a1e7ec0fd3aa87818189bd87710645257.tar
gsoc2013-empathy-e3a4b93a1e7ec0fd3aa87818189bd87710645257.tar.gz
gsoc2013-empathy-e3a4b93a1e7ec0fd3aa87818189bd87710645257.tar.bz2
gsoc2013-empathy-e3a4b93a1e7ec0fd3aa87818189bd87710645257.tar.lz
gsoc2013-empathy-e3a4b93a1e7ec0fd3aa87818189bd87710645257.tar.xz
gsoc2013-empathy-e3a4b93a1e7ec0fd3aa87818189bd87710645257.tar.zst
gsoc2013-empathy-e3a4b93a1e7ec0fd3aa87818189bd87710645257.zip
Fix crash if contact_id is NULL when selecting its color
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-theme-adium.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 66ce03316..5d4316095 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -416,9 +416,10 @@ theme_adium_append_html (EmpathyThemeAdium *theme,
* Incoming/SenderColors.txt it will be used instead of
* the default colors.
*/
- guint hash = g_str_hash (contact_id);
-
- replace = colors[hash % G_N_ELEMENTS (colors)];
+ if (contact_id != NULL) {
+ guint hash = g_str_hash (contact_id);
+ replace = colors[hash % G_N_ELEMENTS (colors)];
+ }
} else if (theme_adium_match (&cur, "%senderStatusIcon%")) {
/* FIXME: The path to the status icon of the sender
* (available, away, etc...)