commit 8fd4887ddb018bf667b65a5683bd1cc73df7004c
parent 44587107ff4d7f229081fd2e7e8ab4fc7a340541
Author: Nico Golde <nion@suckless.org>
Date:   Mon, 29 Jan 2007 21:01:36 +0100
bugfix if fd is NULL
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ii.c b/ii.c
@@ -221,7 +221,7 @@ static void print_out(char *channel, char *buf)
 	time_t t = time(0);
 
 	create_filepath(outfile, sizeof(outfile), channel, "out");
-	out = fopen(outfile, "a");
+	if(!(out = fopen(outfile, "a"))) return;
 	strftime(buft, sizeof(buft), "%F %R", localtime(&t));
 	fprintf(out, "%s %s\n", buft, buf);
 	fclose(out);