mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Autolog shouldn't crash when lines are written without destination window
(can happen at /upgrade) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2950 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
55c2e7a066
commit
77b3ab3c44
@ -475,11 +475,12 @@ static void log_single_line(WINDOW_REC *window, const char *server_tag,
|
|||||||
char **targets, **tmp;
|
char **targets, **tmp;
|
||||||
LOG_REC *log;
|
LOG_REC *log;
|
||||||
|
|
||||||
|
if (window != NULL) {
|
||||||
/* save to log created with /WINDOW LOG */
|
/* save to log created with /WINDOW LOG */
|
||||||
ltoa(windownum, window->refnum);
|
ltoa(windownum, window->refnum);
|
||||||
log = logs_find_item(LOG_ITEM_WINDOW_REFNUM,
|
log = logs_find_item(LOG_ITEM_WINDOW_REFNUM,
|
||||||
windownum, NULL, NULL);
|
windownum, NULL, NULL);
|
||||||
if (log != NULL) {
|
if (log != NULL)
|
||||||
log_write_rec(log, text, level);
|
log_write_rec(log, text, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user