Mercurial > pidgin.yaz
diff src/util.c @ 7430:783eea64614c
[gaim-migrate @ 8034]
a better fix. gaim_normalize() isn't meant to return NULL.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Wed, 05 Nov 2003 00:18:51 +0000 |
parents | 414c701ef1ff |
children | 825351e3b01b |
line wrap: on
line diff
--- a/src/util.c Wed Nov 05 00:11:31 2003 +0000 +++ b/src/util.c Wed Nov 05 00:18:51 2003 +0000 @@ -1301,6 +1301,7 @@ { GaimPlugin *prpl = NULL; GaimPluginProtocolInfo *prpl_info = NULL; + const char *ret = NULL; if(account) prpl = gaim_find_prpl(gaim_account_get_protocol(account)); @@ -1308,9 +1309,10 @@ if(prpl) prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); - if(prpl_info && prpl_info->normalize) { - return prpl_info->normalize(account, s); - } else { + if(prpl_info && prpl_info->normalize) + ret = prpl_info->normalize(account, s); + + if(!ret) { static char buf[BUF_LEN]; char *tmp; int i, j; @@ -1332,8 +1334,9 @@ g_snprintf(buf, sizeof(buf), "%s", tmp); g_free(tmp); - return buf; + ret = buf; } + return ret; } /* Look for %n, %d, or %t in msg, and replace with the sender's name, date,