[amiwm] Fix NULL scr issue

If the clock timer fires when global scr is NULL then we end up calling
redrawmenubar() with a NULL global scr, but a valid local scr.

So just pass in the scr used when doing "stuff" into redrawmenubar(),
making the 'scr' in redrawmenubar() also local scope.
This commit is contained in:
Adrian Chadd
2022-09-05 16:03:55 -07:00
parent 21423a0c10
commit 229d2b2c4d
3 changed files with 12 additions and 12 deletions

2
menu.c
View File

@@ -494,7 +494,7 @@ void createmenubar()
* This takes in the target window, which may be the basic menubar,
* a clicked-on menu, or the depth widget.
*/
void redrawmenubar(Window w)
void redrawmenubar(Scrn *scr, Window w)
{
static const char defaultTimeFormat[] = "%c";
int widget_rhs;