Mercurial > pidgin.yaz
comparison src/log.c @ 8111:869d5a5495b8
[gaim-migrate @ 8812]
fix a segfault someone got (Robot101, this is a debian bug, but I'm too
lazy to look up the number)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Thu, 15 Jan 2004 06:59:41 +0000 |
parents | 81079e3eda47 |
children | 2279bfa6aa59 |
comparison
equal
deleted
inserted
replaced
8110:380d2bbdef1a | 8111:869d5a5495b8 |
---|---|
262 static GList *log_lister_common(const char *screenname, GaimAccount *account, const char *ext, GaimLogLogger *logger) | 262 static GList *log_lister_common(const char *screenname, GaimAccount *account, const char *ext, GaimLogLogger *logger) |
263 { | 263 { |
264 GDir *dir; | 264 GDir *dir; |
265 GList *list = NULL; | 265 GList *list = NULL; |
266 const char *filename; | 266 const char *filename; |
267 char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account))); | 267 char *me; |
268 | |
269 const char *prpl; | |
270 char *path; | |
271 | |
272 if(!account) | |
273 return NULL; | |
274 | |
275 me = g_strdup(gaim_normalize(account, gaim_account_get_username(account))); | |
268 | 276 |
269 /* does this seem like a bad way to get this component of the path to anyone else? --Nathan */ | 277 /* does this seem like a bad way to get this component of the path to anyone else? --Nathan */ |
270 const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO | 278 prpl = GAIM_PLUGIN_PROTOCOL_INFO |
271 (gaim_find_prpl(gaim_account_get_protocol_id(account)))->list_icon(account, NULL); | 279 (gaim_find_prpl(gaim_account_get_protocol_id(account)))->list_icon(account, NULL); |
272 char *path = g_build_filename(gaim_user_dir(), "logs", prpl, me, gaim_normalize(account, screenname), NULL); | 280 path = g_build_filename(gaim_user_dir(), "logs", prpl, me, gaim_normalize(account, screenname), NULL); |
273 | 281 |
274 g_free(me); | 282 g_free(me); |
275 | 283 |
276 if (!(dir = g_dir_open(path, 0, NULL))) { | 284 if (!(dir = g_dir_open(path, 0, NULL))) { |
277 g_free(path); | 285 g_free(path); |