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:
Willow Barraco 2026-02-25 07:42:24 +01:00
parent fa497964fd
commit 7998d8f7fa
No known key found for this signature in database

View file

@ -196,6 +196,10 @@ static bool criteria_matches_view(struct criteria *criteria,
struct sway_container *focus = seat_get_focused_container(seat);
struct sway_view *focused = focus ? focus->view : NULL;
if (!view->container) {
return false;
}
if (criteria->title) {
const char *title = view_get_title(view);
if (!title) {