# HG changeset patch # User Mark Doliner # Date 1176882143 0 # Node ID 55a5791838f77a89f879e81b892421e5b9b0a7e7 # Parent 67627b73e10650cf3840791338150fe7d98fcd8b When reading in substatuses from status.xml, ignore substatuses for which we can't determine the PurpleStatusType. This fixes a crash for me when switching from away to available. I'm not sure what the exact repro case is, but it definitely happens. diff -r 67627b73e106 -r 55a5791838f7 libpurple/savedstatuses.c --- a/libpurple/savedstatuses.c Wed Apr 18 07:18:12 2007 +0000 +++ b/libpurple/savedstatuses.c Wed Apr 18 07:42:23 2007 +0000 @@ -403,6 +403,12 @@ g_free(data); } + if (ret->type == NULL) + { + g_free(ret); + return NULL; + } + /* Read the message */ node = xmlnode_get_child(substatus, "message"); if ((node != NULL) && ((data = xmlnode_get_data(node)) != NULL))