mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 10:11:43 -05:00
Don't try to access the focused desktop of NULL
This commit is contained in:
parent
25b3086e0a
commit
6829eede5c
1 changed files with 5 additions and 3 deletions
8
query.c
8
query.c
|
@ -282,9 +282,11 @@ bool monitor_from_desc(char *desc, coordinates_t *ref, coordinates_t *dst)
|
|||
} else if (streq("last", desc)) {
|
||||
history_find_monitor(HISTORY_OLDER, ref, dst, sel);
|
||||
} else if (streq("primary", desc)) {
|
||||
coordinates_t loc = {pri_mon, pri_mon->desk, NULL};
|
||||
if (pri_mon != NULL && desktop_matches(&loc, ref, sel))
|
||||
dst->monitor = pri_mon;
|
||||
if (pri_mon != NULL) {
|
||||
coordinates_t loc = {pri_mon, pri_mon->desk, NULL};
|
||||
if (desktop_matches(&loc, ref, sel))
|
||||
dst->monitor = pri_mon;
|
||||
}
|
||||
} else if (streq("focused", desc)) {
|
||||
coordinates_t loc = {mon, mon->desk, NULL};
|
||||
if (desktop_matches(&loc, ref, sel))
|
||||
|
|
Loading…
Add table
Reference in a new issue