changeset 13412:d93194613696

[gaim-migrate @ 15787] If this function were called when conv is not a chat (which should never happen, as this is a signal callback for "received-chat-msg"), then the chat variable could be NULL. We dereference it later, so let's clean up the NULL guards here. Resolves CID 13 committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 07 Mar 2006 01:19:39 +0000
parents 0d223f4ee868
children 79682d6f032e
files src/gtksound.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtksound.c	Tue Mar 07 01:12:13 2006 +0000
+++ b/src/gtksound.c	Tue Mar 07 01:19:39 2006 +0000
@@ -207,8 +207,9 @@
 		return;
 
 	chat = gaim_conversation_get_chat_data(conv);
+	g_return_if_fail(chat != NULL);
 
-	if (chat!=NULL && gaim_conv_chat_is_user_ignored(chat, sender))
+	if (gaim_conv_chat_is_user_ignored(chat, sender))
 		return;
 
 	if (chat_nick_matches_name(conv, sender))