]> granicus.if.org Git - nethack/commitdiff
fix access violation in status_finish() if window port not initialized
authornhmall <nhmall@nethack.org>
Mon, 21 May 2018 22:31:45 +0000 (18:31 -0400)
committernhmall <nhmall@nethack.org>
Mon, 21 May 2018 22:31:45 +0000 (18:31 -0400)
doc/fixes36.2
src/botl.c

index 2cdd77fdc95c5759abbcbbd86678bc796d06e93b..705de5ca38a219fabcb0275722c8ed828db3bec3 100644 (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
index c219d3db39720ffb4920607b46a56beded8535cd..8576d39e20692cd1f063260a103a4034c3f83513 100644 (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) {