Mercurial > pidgin.yaz
changeset 16960:30b906ba3974
Fix log viewer crash when the log filename is doesn't contain a date in the expected format. Fixes #588.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 08 May 2007 20:16:24 +0000 |
parents | 74957a0aa633 |
children | 9133ce89c9d7 |
files | libpurple/log.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/log.c Tue May 08 18:33:11 2007 +0000 +++ b/libpurple/log.c Tue May 08 20:16:24 2007 +0000 @@ -778,7 +778,7 @@ if (tz_off != PURPLE_NO_TZ_OFF) tm.tm_gmtoff = tz_off - tm.tm_gmtoff; - if (rest == NULL || (end = strchr(rest, '.')) == NULL || strchr(rest, ' ') != NULL) + if (stamp == 0 || rest == NULL || (end = strchr(rest, '.')) == NULL || strchr(rest, ' ') != NULL) { log = purple_log_new(type, name, account, NULL, stamp, NULL); } @@ -792,7 +792,7 @@ #else time_t stamp = purple_str_to_time(filename, FALSE, &tm, NULL, NULL); - log = purple_log_new(type, name, account, NULL, stamp, &tm); + log = purple_log_new(type, name, account, NULL, stamp, (stamp != 0) ? &tm : NULL); #endif log->logger = logger;