fix access violation in status_finish() if window port not initialized

This commit is contained in:
nhmall
2018-05-21 18:31:45 -04:00
parent 81e422189c
commit f614b9e27e
2 changed files with 5 additions and 1 deletions

View File

@@ -21,6 +21,9 @@ targetting with a polearm could give away location of hidden monster
static prototype could be left orphaned depending on #defines in rip.c
config file error handling routines were calling xx_wait_synch early
even before the window system was initialized; add a default routine
status_finish() in botl.c would unconditionally invoke the window port's
win_status_finish() routine which was problematic if the windowport
wasn't initialized yet
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository

View File

@@ -876,7 +876,8 @@ status_finish()
int i;
/* call the window port cleanup routine first */
(*windowprocs.win_status_finish)();
if (windowprocs.win_status_finish)
(*windowprocs.win_status_finish)();
/* free memory that we alloc'd now */
for (i = 0; i < MAXBLSTATS; ++i) {