Don't crash when trying to print text when there's no windows yet. Also

print the text to stdout.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2610 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-03-14 06:44:06 +00:00 committed by cras
commit 7d58cc000f
2 changed files with 9 additions and 2 deletions

View file

@ -415,9 +415,15 @@ static void sig_print_text(TEXT_DEST_REC *dest, const char *text)
char *str, *tmp;
g_return_if_fail(dest != NULL);
g_return_if_fail(dest->window != NULL);
g_return_if_fail(text != NULL);
if (dest->window == NULL) {
str = strip_codes(text);
printf("NO WINDOWS: %s\n", str);
g_free(str);
return;
}
msg_beep_check(dest);
if ((dest->level & MSGLEVEL_NEVER) == 0)