diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2013-09-09 21:01:23 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2013-09-09 21:01:23 +0800 |
commit | cb76ee2ab5c27764b5bf489428a1355f4f996a33 (patch) | |
tree | f6f1d3bd5106dcc83e6604676c5db9aa395c3e8f | |
parent | 973bbd733d1351ea637c221e0f09526e08203a77 (diff) | |
download | pttbbs-cb76ee2ab5c27764b5bf489428a1355f4f996a33.tar pttbbs-cb76ee2ab5c27764b5bf489428a1355f4f996a33.tar.gz pttbbs-cb76ee2ab5c27764b5bf489428a1355f4f996a33.tar.bz2 pttbbs-cb76ee2ab5c27764b5bf489428a1355f4f996a33.tar.lz pttbbs-cb76ee2ab5c27764b5bf489428a1355f4f996a33.tar.xz pttbbs-cb76ee2ab5c27764b5bf489428a1355f4f996a33.tar.zst pttbbs-cb76ee2ab5c27764b5bf489428a1355f4f996a33.zip |
Fix crash on crosspost.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5867 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/edit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/edit.c b/pttbbs/mbbsd/edit.c index cc2d732b..2f3162fa 100644 --- a/pttbbs/mbbsd/edit.c +++ b/pttbbs/mbbsd/edit.c @@ -1610,7 +1610,10 @@ void write_header(FILE * fp, const char *mytitle) { assert(mytitle); - if (curr_buf->flags & (EDITFLAG_KIND_MAILLIST | EDITFLAG_KIND_SENDMAIL)) { + // cross_post may call this without setting curr_buf. + // TODO Isolate curr_buf so we don't need to hack around. + if (curr_buf && + curr_buf->flags & (EDITFLAG_KIND_MAILLIST | EDITFLAG_KIND_SENDMAIL)) { fprintf(fp, "%s %s (%s)\n", str_author1, cuser.userid, cuser.nickname ); |