# HG changeset patch # User Eric Warmenhoven # Date 973369227 0 # Node ID 649199f4730e2936e90915873344437da9474e04 # Parent d6c70d58a4b23eb42d50dc762b37e7a603b9f7cc [gaim-migrate @ 1077] more attempts to prevent segfaults due to logging committer: Tailor Script diff -r d6c70d58a4b2 -r 649199f4730e src/conversation.c --- a/src/conversation.c Sat Nov 04 11:18:59 2000 +0000 +++ b/src/conversation.c Sat Nov 04 20:20:27 2000 +0000 @@ -1223,12 +1223,14 @@ else g_snprintf(nm, 256, "%s", c->name); fd = open_log_file(nm); - if (general_options & OPT_GEN_STRIP_HTML) { - fprintf(fd, "%s\n", t1); - } else { - fprintf(fd, "%s
\n", t1); + if (fd > 0) { + if (general_options & OPT_GEN_STRIP_HTML) { + fprintf(fd, "%s\n", t1); + } else { + fprintf(fd, "%s
\n", t1); + } + fclose(fd); } - fclose(fd); if (general_options & OPT_GEN_STRIP_HTML) { g_free(t1); } @@ -1318,12 +1320,14 @@ t2 = what; } fd = open_log_file(nm); - if (general_options & OPT_GEN_STRIP_HTML) { - fprintf(fd, "%s%s\n", t1, t2); - } else { - fprintf(fd, "%s%s
\n", t1, t2); + if (fd > 0) { + if (general_options & OPT_GEN_STRIP_HTML) { + fprintf(fd, "%s%s\n", t1, t2); + } else { + fprintf(fd, "%s%s
\n", t1, t2); + } + fclose(fd); } - fclose(fd); if (general_options & OPT_GEN_STRIP_HTML) { g_free(t1); g_free(t2);