comparison libpurple/protocols/zephyr/zephyr.c @ 22407:c59489e56735

Fix a crash in the zephyr normalize function that I added when gc is null (happens when reading in accounts.xml). My bad.
author Mark Doliner <mark@kingant.net>
date Mon, 03 Mar 2008 08:50:27 +0000
parents 99c6ed4c9cbe
children 718a9c287839 efaecb71baad
comparison
equal deleted inserted replaced
22406:1d3783f659c2 22407:c59489e56735
2233 static char buf[BUF_LEN]; 2233 static char buf[BUF_LEN];
2234 PurpleConnection *gc; 2234 PurpleConnection *gc;
2235 char *tmp; 2235 char *tmp;
2236 2236
2237 gc = purple_account_get_connection(account); 2237 gc = purple_account_get_connection(account);
2238 if (gc == NULL)
2239 return NULL;
2240
2238 tmp = local_zephyr_normalize(gc->proto_data, who); 2241 tmp = local_zephyr_normalize(gc->proto_data, who);
2239 2242
2240 if (strlen(tmp) >= sizeof(buf)) { 2243 if (strlen(tmp) >= sizeof(buf)) {
2241 g_free(tmp); 2244 g_free(tmp);
2242 return NULL; 2245 return NULL;