diff options
author | Timo Sirainen <cras@irssi.org> | 2001-03-26 02:02:50 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-03-26 02:02:50 +0000 |
commit | 3f0498eb200ab7640ae578e415355fbd3c7cf14b (patch) | |
tree | 8202b9ed59caba84f769768f6bc6a4b876612ae4 /src | |
parent | 4d29260e09cc8b1efed2053d69b96d7954352343 (diff) | |
download | irssi-3f0498eb200ab7640ae578e415355fbd3c7cf14b.zip |
When closing autologs, don't crash if some other temporary log is open, like
awaylog.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1424 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/fe-log.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index e181562d..55beb41a 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -340,10 +340,13 @@ static void sig_server_disconnected(SERVER_REC *server) for (tmp = logs; tmp != NULL; tmp = next) { LOG_REC *log = tmp->data; - next = tmp->next; + next = tmp->next; + + if (log->temp || log->items == NULL) + continue; - logitem = log->items == NULL ? NULL : log->items->data; - if (log->temp && logitem->type == LOG_ITEM_TARGET && + logitem = log->items->data; + if (logitem->type == LOG_ITEM_TARGET && g_strcasecmp(logitem->servertag, server->tag) == 0) log_close(log); } |