diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 1999-11-25 15:57:54 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 1999-11-25 15:57:54 +0000 |
commit | e9b61ea0fdba46cbdba99a08028ff9097f52803a (patch) | |
tree | dc8fdb104a98a5d7f911ae90253024c9d9a9285a /games/battlestar | |
parent | 45a43b495c26785b25fad2d2e4380b386b075261 (diff) | |
download | src-e9b61ea0fdba46cbdba99a08028ff9097f52803a.tar.gz src-e9b61ea0fdba46cbdba99a08028ff9097f52803a.zip |
Don't coredump if can't write to the scorefile.
Notes
Notes:
svn path=/head/; revision=53692
Diffstat (limited to 'games/battlestar')
-rw-r--r-- | games/battlestar/com6.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/games/battlestar/com6.c b/games/battlestar/com6.c index ec01b111292a..a22b0fb7fa43 100644 --- a/games/battlestar/com6.c +++ b/games/battlestar/com6.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef lint @@ -105,7 +107,12 @@ char ch; struct timeval tv; char *date; time_t tvsec; - int s = sigblock(sigmask(SIGINT)); + int s; + + if (score_fp == NULL) + return; + + s = sigblock(sigmask(SIGINT)); gettimeofday(&tv, (struct timezone *)0); /* can't call time */ tvsec = (time_t) tv.tv_sec; |