# HG changeset patch # User Nathan Walp # Date 1141718142 0 # Node ID f3768fab10bd34301162bf497855096fb4c8ad52 # Parent eb439b15321ba442149cf2459c7762e318fa680b [gaim-migrate @ 15816] this would probably never happen, but clean up CID 36 committer: Tailor Script diff -r eb439b15321b -r f3768fab10bd src/desktopitem.c --- a/src/desktopitem.c Tue Mar 07 07:44:03 2006 +0000 +++ b/src/desktopitem.c Tue Mar 07 07:55:42 2006 +0000 @@ -732,7 +732,7 @@ p = strchr (locale, '.'); if (p != NULL) *p = '\0'; - + if (g_list_find_custom (item->languages, locale, (GCompareFunc)strcmp) == NULL) { item->languages = g_list_prepend @@ -741,12 +741,14 @@ g_free (locale); } - /* Whack encoding from encoding in the key */ + /* Whack encoding from encoding in the key */ brace = strchr (k, '['); - p = strchr (brace, '.'); - if (p != NULL) { - *p = ']'; - *(p+1) = '\0'; + if(brace != NULL) { + p = strchr (brace, '.'); + if (p != NULL) { + *p = ']'; + *(p+1) = '\0'; + } } } }