Amiga: fix overview-window crashes

- MyAllocBitMap left bm->mflags uninitialized, so MyFreeBitMap took the
  wrong path between FreeRaster and FreeMem and intermittently corrupted
  exec's free list (Software Failure 0x81000005, DEADEND in FreeMem).
- The NHW_OVER window is BORDERLESS, so attaching WINDOWSIZING |
  WINDOWDRAG | WINDOWCLOSE created phantom gadgets that hit-test against
  unrelated input.  Pressing ESC while the overview was selected fired
  CLOSEWINDOW and destroyed the window underneath the running code,
  leading to wild-PC crashes.  Drop the gadget flags; SHIFT-HELP already
  toggles the overview cleanly via delayed_key_action.
- amii_destroy_nhwindow only reset WIN_MAP / WIN_STATUS / WIN_MESSAGE /
  WIN_INVEN; WIN_OVER and WIN_BASE kept pointing at freed slots, so any
  later 'WIN_X != WIN_ERR && amii_wins[WIN_X]->win' check dereferenced
  NULL.  Reset them too.
This commit is contained in:
Ingo Paschke
2026-05-12 15:12:07 +02:00
parent 7c8524ae37
commit f583787825
2 changed files with 12 additions and 2 deletions
+1
View File
@@ -189,6 +189,7 @@ MyAllocBitMap(int xsize, int ysize, int depth, long mflags)
if (!bm)
return (NULL);
bm->mflags = mflags;
bm->xsize = xsize;
bm->ysize = ysize;
InitBitMap(&bm->bm, depth, xsize, ysize);