pidgin: c0a4c265: As darkrain pointed out this isnt caused...

sulabh at soc.pidgin.im sulabh at soc.pidgin.im
Fri Aug 28 16:55:21 EDT 2009


-----------------------------------------------------------------
Revision: c0a4c2650c0117a4b956199f56d5b990e0c3fb0d
Ancestor: 2c2401820569b102feeb7ce574b90abdc6406f99
Author: sulabh at soc.pidgin.im
Date: 2009-08-28T20:51:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c0a4c2650c0117a4b956199f56d5b990e0c3fb0d

Modified files:
        libpurple/util.c

ChangeLog: 

As darkrain pointed out this isnt caused by that certain bug in glib. My mistake. Recomment, and change how I test str to be NULL and return NULL.

-------------- next part --------------
============================================================
--- libpurple/util.c	550b810b97856ff3828884587969e257b5d107e0
+++ libpurple/util.c	a5e31764cf185f8ab9b302693ef008b43d09def3
@@ -3129,11 +3129,8 @@ purple_normalize(const PurpleAccount *ac
 	const char *ret = NULL;
 	static char buf[BUF_LEN];
 
-	/* g_utf8_normalize() for glib ver < 2.15.0 causes a crash when an invalid utf8 string is passed to it
-	   (http://bugzilla.gnome.org/show_bug.cgi?id=501997).
-	   Returning NULL when str is NULL, should prevent a few crashes, see #10115 */
-	if(!str)
-		return NULL;
+	/* This should prevent a crash if purple_normalize gets called with NULL str, see #10115 */
+	g_return_val_if_fail(str != NULL, "");
 
 	if (account != NULL)
 	{


More information about the Commits mailing list