From 9bb3a096e9d6d16f40db508228e460ed67eb15ec Mon Sep 17 00:00:00 2001 From: in2 Date: Mon, 17 Jan 2005 16:04:13 +0000 Subject: curr_buf is not available when cross posting. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2408 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 54d90cdb..69756bc2 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -965,7 +965,8 @@ write_header(FILE * fp) memset(&postlog, 0, sizeof(postlog)); strlcpy(postlog.author, cuser.userid, sizeof(postlog.author)); - curr_buf->ifuseanony = 0; + if (curr_buf) + curr_buf->ifuseanony = 0; #ifdef HAVE_ANONYMOUS if (currbrdattr & BRD_ANONYMOUS) { int defanony = (currbrdattr & BRD_DEFAULTANONYMOUS); @@ -1039,7 +1040,7 @@ addsignature(FILE * fp, int ifuseanony) ") \n◆ From: %s\n", fromhost); return; } - if (!curr_buf->ifuseanony) { + if (curr_buf && !curr_buf->ifuseanony) { num = showsignature(fpath, &i); if (num){ msg[34] = ch = isdigit(cuser.signature) ? cuser.signature : 'X'; @@ -1068,7 +1069,7 @@ addsignature(FILE * fp, int ifuseanony) } #ifdef HAVE_ORIGIN #ifdef HAVE_ANONYMOUS - if (curr_buf->ifuseanony) + if (curr_buf && curr_buf->ifuseanony) fprintf(fp, "\n--\n※ 發信站: " BBSNAME "(" MYHOSTNAME ") \n◆ From: %s\n", "暱名天使的家"); else { -- cgit v1.2.3