Mercurial > pidgin
diff src/protocols/msn/msg.c @ 5478:bae3c48b9b4c
[gaim-migrate @ 5874]
Fixed a debug warning.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 22 May 2003 10:20:54 +0000 |
parents | f9658a84d1ed |
children | 4f72b611f0ee |
line wrap: on
line diff
--- a/src/protocols/msn/msg.c Thu May 22 05:36:47 2003 +0000 +++ b/src/protocols/msn/msg.c Thu May 22 10:20:54 2003 +0000 @@ -392,16 +392,19 @@ msn_message_set_content_type(MsnMessage *msg, const char *type) { g_return_if_fail(msg != NULL); - g_return_if_fail(type != NULL); if (msg->content_type != NULL) { msg->size -= strlen(msg->content_type); g_free(msg->content_type); } - msg->content_type = g_strdup(type); + if (type != NULL) { + msg->content_type = g_strdup(type); - msg->size += strlen(type); + msg->size += strlen(type); + } + else + msg->content_type = NULL; } const char *