Merge pull request #1776 from Airblader/bug-1774

Return non-match instead of asserting
This commit is contained in:
Michael Stapelberg 2015-07-01 03:00:37 -07:00
commit 7e7f00428f
1 changed files with 5 additions and 3 deletions

View File

@ -175,10 +175,12 @@ bool match_matches_window(Match *match, i3Window *window) {
}
if (match->workspace != NULL) {
Con *con = con_by_window_id(window->id);
assert(con != NULL);
if ((con = con_by_window_id(window->id)) == NULL)
return false;
Con *ws = con_get_workspace(con);
assert(ws != NULL);
if (ws == NULL)
return false;
if (regex_matches(match->workspace, ws->name)) {
LOG("workspace matches (%s)\n", ws->name);