From: PatR Date: Wed, 13 Mar 2019 01:37:15 +0000 (-0700) Subject: X11 graphical tombstone tweak X-Git-Tag: NetHack-3.6.2_Released~42^2~1^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62a34040bdc6454797db2a61529e9864127f2267;p=nethack X11 graphical tombstone tweak Add some bullet-proofing to the X11 graphical tombstone sanity check. Probably not necessary but better safe than sorry. --- diff --git a/win/X11/winX.c b/win/X11/winX.c index 958625a0d..c8af06a90 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 winX.c $NHDT-Date: 1552422652 2019/03/12 20:30:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.72 $ */ +/* NetHack 3.6 winX.c $NHDT-Date: 1552441031 2019/03/13 01:37:11 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.73 $ */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1355,14 +1355,15 @@ int how; time_t when; { struct xwindow *wp; - FILE *rip_fp; + FILE *rip_fp = 0; check_winid(window); wp = &window_list[window]; - /* make sure the graphic_tombstone is available; it's not easy to - revert to ordinary text tombstone once we're past this point... */ - rip_fp = fopen(appResources.tombstone, "r"); /* "rip.xpm" */ + /* make sure the graphical tombstone is available; it's not easy to + revert to the ASCII-art text tombstone once we're past this point */ + if (appResources.tombstone && *appResources.tombstone) + rip_fp = fopen(appResources.tombstone, "r"); /* "rip.xpm" */ if (!rip_fp) { genl_outrip(window, how, when); return;