]> granicus.if.org Git - nethack/commitdiff
fix github issue #187 - 'reassess' panic with Qt5
authorPatR <rankin@nethack.org>
Mon, 29 Apr 2019 00:32:16 +0000 (17:32 -0700)
committerPatR <rankin@nethack.org>
Mon, 29 Apr 2019 00:32:16 +0000 (17:32 -0700)
Fixes #187

Qt5 gave "status 'reassess' before init" panic at start of new game.
Don't call status_initialize(REASSESS) from set_usamon()--used for
hero setup as well as for hero polymorph--unless it was previously
called from display_gamewindows() with !REASSESS [which happens when
windowprocs.wincap2 has WC2_STATUS_HILITES or WC2_FLUSH_STATUS set].

doc/fixes36.2
src/polyself.c

index 712f9da0a4b088544fee6d77fcecfed3a60a9d85..2a64a966c06e5a78e691cff96d4ba3e4d45c4d18 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.310 $ $NHDT-Date: 1556201496 2019/04/25 14:11:36 $
+$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.311 $ $NHDT-Date: 1556497911 2019/04/29 00:31:51 $
 
 This fixes36.2 file is here to capture information about updates in the 3.6.x
 lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -514,6 +514,9 @@ tty: when clipping was used to show a subset of the map on a small display,
        would ask the core to generate a new view of the map rather than use
        whatever was currently shown, bringing back suppressed monsters/
        objects/traps for #terrain and new hallucinatory monsters for farlook
+Qt5, perhaps others: avoid "status 'reassess' before init" panic near start
+       of new game (triggered from set_uasmon() if core was built with
+       STATUS_HILITES enabled but current interface doesn't support that)
 X11: its use of genl_status_update exposed a negative index use that could
        lead to a segfault
 X11: rollback disabling of keystroke input for PICK_NONE menus (for scrolling)
index 084c2d4f82f6bcec024ae181bf5ae840ab6555d4..a8e434206b117c2c801f1ed3bb4ff48d708dfbc3 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 polyself.c      $NHDT-Date: 1556201497 2019/04/25 14:11:37 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.131 $ */
+/* NetHack 3.6 polyself.c      $NHDT-Date: 1556497911 2019/04/29 00:31:51 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.132 $ */
 /*      Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -101,7 +101,8 @@ set_uasmon()
     polysense();
 
 #ifdef STATUS_HILITES
-    status_initialize(REASSESS_ONLY);
+    if (VIA_WINDOWPORT())
+        status_initialize(REASSESS_ONLY);
 #endif
 }