# HG changeset patch # User Elliott Sales de Andrade # Date 1215847796 0 # Node ID a2f06797a1b0fc1c52a974ed6570336e7348f3ca # Parent 9fa6ce44149f65fa84d49c77d9a1144e5528d371# Parent a0e957b7b923fd731f0bdc26c86e875838f0defa merge of '0cbcb7f910c95c3dac3f06c404e29dcc8b709419' and 'd6d2e0024c0c5f5f7b447551d746d165e2b58a8d' diff -r a0e957b7b923 -r a2f06797a1b0 libpurple/protocols/msnp9/command.c --- a/libpurple/protocols/msnp9/command.c Sat Jul 12 06:44:19 2008 +0000 +++ b/libpurple/protocols/msnp9/command.c Sat Jul 12 07:29:56 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;