mirror of
https://github.com/swaywm/sway.git
synced 2026-03-30 11:10:59 -04:00
Skip checking if criteria is matching the view when not mapped
Multiple checks in this method use view->container, but it can be NULL at some points. Bail early to avoid crash.
This commit is contained in:
parent
0356a020c1
commit
c57daaf0d1
1 changed files with 4 additions and 0 deletions
|
|
@ -196,6 +196,10 @@ static bool criteria_matches_view(struct criteria *criteria,
|
||||||
struct sway_container *focus = seat_get_focused_container(seat);
|
struct sway_container *focus = seat_get_focused_container(seat);
|
||||||
struct sway_view *focused = focus ? focus->view : NULL;
|
struct sway_view *focused = focus ? focus->view : NULL;
|
||||||
|
|
||||||
|
if (!view->container) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (criteria->title) {
|
if (criteria->title) {
|
||||||
const char *title = view_get_title(view);
|
const char *title = view_get_title(view);
|
||||||
if (!title) {
|
if (!title) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue