changeset 7183:071dee25c48e

[gaim-migrate @ 7751] fix jabber segfault on changing of topic in a chat committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 07 Oct 2003 14:20:48 +0000
parents 65acffe70a6d
children 89dc8a119918
files src/protocols/jabber/message.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/message.c	Tue Oct 07 00:21:53 2003 +0000
+++ b/src/protocols/jabber/message.c	Tue Oct 07 14:20:48 2003 +0000
@@ -144,10 +144,12 @@
 		return;
 
 	if(jm->subject)
-		gaim_conv_chat_set_topic(GAIM_CONV_CHAT(chat->conv), jid->resource, jm->subject);
+		gaim_conv_chat_set_topic(GAIM_CONV_CHAT(chat->conv), jid->resource,
+				jm->subject);
 
-	serv_got_chat_in(jm->js->gc, chat->id, jabber_get_resource(jm->from),
-			0, jm->xhtml ? jm->xhtml : jm->body, jm->sent);
+	if(jm->xhtml || jm->body)
+		serv_got_chat_in(jm->js->gc, chat->id, jabber_get_resource(jm->from),
+				0, jm->xhtml ? jm->xhtml : jm->body, jm->sent);
 	jabber_id_free(jid);
 }