changeset 23523:9fa6ce44149f

Also commit the change from b062f14d1bcd8e6c28b2b05977aa19a4bfd4867c to the msnp9 version. References #5545.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 12 Jul 2008 07:29:38 +0000
parents c1cba867b3da
children a2f06797a1b0
files libpurple/protocols/msnp9/command.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msnp9/command.c	Sat Jun 21 06:50:53 2008 +0000
+++ b/libpurple/protocols/msnp9/command.c	Sat Jul 12 07:29:38 2008 +0000
@@ -65,9 +65,12 @@
 		for (c = 0; cmd->params[c]; c++);
 		cmd->param_count = c;
 
-		param = cmd->params[0];
-
-		cmd->trId = is_num(param) ? atoi(param) : 0;
+		if (cmd->param_count) {
+			char *param = cmd->params[0];
+			cmd->trId = is_num(param) ? atoi(param) : 0;
+		} else {
+			cmd->trId = 0;
+		}
 	}
 	else
 		cmd->trId = 0;