changeset 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 d70f4e25eab5
children e8e5931e7e8d
files src/util.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);