Mercurial > pidgin.yaz
changeset 28476:5901b1dd8d07
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.
author | Sulabh Mahajan <sulabh@soc.pidgin.im> |
---|---|
date | Fri, 28 Aug 2009 20:51:48 +0000 |
parents | 862467b37ee6 |
children | 67e93a042bf9 |
files | libpurple/util.c |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/util.c Fri Aug 28 20:30:03 2009 +0000 +++ b/libpurple/util.c Fri Aug 28 20:51:48 2009 +0000 @@ -3129,11 +3129,8 @@ 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) {