Mercurial > pidgin
changeset 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 | e8e498255369 |
children | 175de59cd1c5 |
files | src/protocols/msn/msg.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
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 *