changeset 1034:1d43fda97960

[gaim-migrate @ 1044] this is bad, it silently fails if you can't log, but then again, it's better than verbally segfaulting committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 31 Oct 2000 07:18:44 +0000
parents 099748ff3a0a
children 80a47e3b1bca
files src/conversation.c
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Tue Oct 31 07:06:37 2000 +0000
+++ b/src/conversation.c	Tue Oct 31 07:18:44 2000 +0000
@@ -127,12 +127,14 @@
 		FILE *fd;
 
 		fd = open_log_file(c->name);
-		if (!(general_options & OPT_GEN_STRIP_HTML))
-			fprintf(fd, "<HR><BR><H3 Align=Center> ---- New Conversation @ %s ----</H3><BR>\n", full_date()); 
-		else
-			fprintf(fd, " ---- New Conversation @ %s ----\n", full_date()); 
-
-		fclose(fd);
+		if (fd > 0) {
+			if (!(general_options & OPT_GEN_STRIP_HTML))
+				fprintf(fd, "<HR><BR><H3 Align=Center> ---- New Conversation @ %s ----</H3><BR>\n", full_date()); 
+			else
+				fprintf(fd, " ---- New Conversation @ %s ----\n", full_date()); 
+			fclose(fd);
+		} else
+			/* do we want to do something here? */ ;
 	}
 
 	if (connections)