changeset 13635:2c84df43f126

[gaim-migrate @ 16033] Fix Coverity CID 119 committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 15 Apr 2006 14:14:50 +0000
parents 8872789902a1
children 293088b65dac
files src/protocols/silc/silc.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/silc/silc.c	Sat Apr 15 13:39:26 2006 +0000
+++ b/src/protocols/silc/silc.c	Sat Apr 15 14:14:50 2006 +0000
@@ -1247,7 +1247,7 @@
 		const char *cmd, char **args, char **error, void *data)
 {
 	GaimConnection *gc;
-	GaimConversation *convo;
+	GaimConversation *convo = conv;
 	int id = 0;
 
 	gc = gaim_conversation_get_gc(conv);
@@ -1255,13 +1255,12 @@
 	if (gc == NULL)
 		return GAIM_CMD_RET_FAILED;
 
-	if(args && args[0]) {
+	if(args && args[0])
 		convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0],
 									gc->account);
-	} else
-		convo = conv;
 
-	id = gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo));
+	if (convo != NULL)
+		id = gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo));
 
 	if (id == 0)
 		return GAIM_CMD_RET_FAILED;