# HG changeset patch # User Mark Doliner # Date 1092878038 0 # Node ID 1e5ef71c9583eaf4c0c48f8ed25ae4bc8244714f # Parent 4c1a1be8ce339dd39139200a24c7c4fdb3adf83b [gaim-migrate @ 10644] A patch from Daniel Atallah that should fix sf bug 1008489: "Windows Messenger BOT Crashes Gaim" Someone MSN-savvy should check this to make sure it's a valid fix. committer: Tailor Script diff -r 4c1a1be8ce33 -r 1e5ef71c9583 src/protocols/msn/object.c --- a/src/protocols/msn/object.c Thu Aug 19 01:06:34 2004 +0000 +++ b/src/protocols/msn/object.c Thu Aug 19 01:13:58 2004 +0000 @@ -76,6 +76,14 @@ GET_STRING_TAG(sha1d, "SHA1D"); GET_STRING_TAG(sha1c, "SHA1C"); + /* If we are missing any of the required elements then discard the object */ + if (obj->creator == NULL || obj->size == 0 || obj->type == 0 + || obj->location == NULL || obj->friendly == NULL + || obj->sha1d == NULL || obj->sha1c == NULL) { + msn_object_destroy(obj); + obj = NULL; + } + return obj; } diff -r 4c1a1be8ce33 -r 1e5ef71c9583 src/protocols/msn/user.c --- a/src/protocols/msn/user.c Thu Aug 19 01:06:34 2004 +0000 +++ b/src/protocols/msn/user.c Thu Aug 19 01:13:58 2004 +0000 @@ -285,7 +285,7 @@ user->msnobj = obj; - if (user->list_op & MSN_LIST_FL_OP) + if ((obj != NULL) && (user->list_op & MSN_LIST_FL_OP)) { /* TODO: I think we need better buddy icon core functions */ GaimAccount *account;