mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -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,12 +475,13 @@ static void log_single_line(WINDOW_REC *window, const char *server_tag,
|
|||||||
char **targets, **tmp;
|
char **targets, **tmp;
|
||||||
LOG_REC *log;
|
LOG_REC *log;
|
||||||
|
|
||||||
/* save to log created with /WINDOW LOG */
|
if (window != NULL) {
|
||||||
ltoa(windownum, window->refnum);
|
/* save to log created with /WINDOW LOG */
|
||||||
log = logs_find_item(LOG_ITEM_WINDOW_REFNUM,
|
ltoa(windownum, window->refnum);
|
||||||
windownum, NULL, NULL);
|
log = logs_find_item(LOG_ITEM_WINDOW_REFNUM,
|
||||||
if (log != NULL) {
|
windownum, NULL, NULL);
|
||||||
log_write_rec(log, text, level);
|
if (log != NULL)
|
||||||
|
log_write_rec(log, text, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target == NULL)
|
if (target == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user