~ruther/dwl

0a078ce21e1ec4c5913fd0dd63e64452dc736c4a — Rutherther 11 months ago d7a98c3
fix: do not segfault on selmon NULL
1 files changed, 3 insertions(+), 1 deletions(-)

M dwl.c
M dwl.c => dwl.c +3 -1
@@ 2911,11 2911,13 @@ void
view(const Arg *arg)
{
	Monitor *m, *origm = selmon;
	unsigned int newtags = selmon->tagset[selmon->seltags ^ 1];
	unsigned int newtags;

	if (!selmon || (arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
		return;

	newtags = selmon->tagset[selmon->seltags ^ 1];

	/* swap tags when trying to display a tag from another monitor */
	if (arg->ui & TAGMASK)
		newtags = arg->ui & TAGMASK;

Do not follow this link