# HG changeset patch # User Richard Laager # Date 1176677736 0 # Node ID 3e400c5b0b512245143d5f619b8dd8632f165e38 # Parent 8150347691d247856fd677e6b9ac9f449580e9ac simple-crashfix.diff from achris in ticket #98. This is a fix for the crasher, as opposed to the fix for the bug that triggered the crasher. diff -r 8150347691d2 -r 3e400c5b0b51 libpurple/protocols/simple/simple.c --- a/libpurple/protocols/simple/simple.c Sun Apr 15 22:32:23 2007 +0000 +++ b/libpurple/protocols/simple/simple.c Sun Apr 15 22:55:36 2007 +0000 @@ -593,12 +593,16 @@ GSList *transactions = sip->transactions; gchar *cseq = sipmsg_find_header(msg, "CSeq"); - while(transactions) { - trans = transactions->data; - if(!strcmp(trans->cseq, cseq)) { - return trans; + if (cseq) { + while(transactions) { + trans = transactions->data; + if(!strcmp(trans->cseq, cseq)) { + return trans; + } + transactions = transactions->next; } - transactions = transactions->next; + } else { + purple_debug(PURPLE_DEBUG_MISC, "simple", "Received message contains no CSeq header.\n"); } return NULL;