diff src/util.c @ 13645:073bc6da6403

[gaim-migrate @ 16043] crashes inform me that g_utf8_strdown and/or g_utf8_normalize can return NULL when the input string is not NULL committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 17 Apr 2006 00:17:00 +0000
parents 68157ab4e1c9
children 9df4a46b0bb3
line wrap: on
line diff
--- a/src/util.c	Sun Apr 16 20:18:17 2006 +0000
+++ b/src/util.c	Mon Apr 17 00:17:00 2006 +0000
@@ -2667,7 +2667,7 @@
 
 	tmp1 = g_utf8_strdown(str, -1);
 	tmp2 = g_utf8_normalize(tmp1, -1, G_NORMALIZE_DEFAULT);
-	g_snprintf(buf, sizeof(buf), "%s", tmp2);
+	g_snprintf(buf, sizeof(buf), "%s", tmp2 ? tmp2 : "");
 	g_free(tmp2);
 	g_free(tmp1);