# HG changeset patch # User Mark Doliner # Date 1185092988 0 # Node ID e333072d86808c0a28bf8db806f7078285fe1511 # Parent 2774acdb1cff7d64b0670d823c8e09c8dc4b1dd8 I don't think this check is needed. If it is then it's because we're inserting "NULL" into a tlvchain and that should be fixed. diff -r 2774acdb1cff -r e333072d8680 libpurple/protocols/oscar/tlv.c --- a/libpurple/protocols/oscar/tlv.c Sun Jul 22 08:28:55 2007 +0000 +++ b/libpurple/protocols/oscar/tlv.c Sun Jul 22 08:29:48 2007 +0000 @@ -718,12 +718,10 @@ for (cur = list, i = 0; cur != NULL; cur = cur->next) { tlv = cur->data; - if (tlv != NULL) { /* TODO: This NULL check shouldn't be needed */ - if (tlv->type == type) - i++; - if (i >= nth) - return tlv; - } + if (tlv->type == type) + i++; + if (i >= nth) + return tlv; } return NULL;