# HG changeset patch # User Nathan Walp # Date 1074149981 0 # Node ID 869d5a5495b82e9c93754044b0efee78e9d11981 # Parent 380d2bbdef1a121189e2599db34210c89df9fb66 [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 diff -r 380d2bbdef1a -r 869d5a5495b8 src/log.c --- a/src/log.c Thu Jan 15 06:58:58 2004 +0000 +++ b/src/log.c Thu Jan 15 06:59:41 2004 +0000 @@ -264,12 +264,20 @@ GDir *dir; GList *list = NULL; const char *filename; - char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account))); + char *me; + + const char *prpl; + char *path; + + if(!account) + return NULL; + + me = g_strdup(gaim_normalize(account, gaim_account_get_username(account))); /* does this seem like a bad way to get this component of the path to anyone else? --Nathan */ - const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO + prpl = GAIM_PLUGIN_PROTOCOL_INFO (gaim_find_prpl(gaim_account_get_protocol_id(account)))->list_icon(account, NULL); - char *path = g_build_filename(gaim_user_dir(), "logs", prpl, me, gaim_normalize(account, screenname), NULL); + path = g_build_filename(gaim_user_dir(), "logs", prpl, me, gaim_normalize(account, screenname), NULL); g_free(me);