Fixed two null dereferences.

This commit is contained in:
Dane Jensen
2026-07-20 21:18:29 -07:00
parent 6e1e74c382
commit 1503f91446
2 changed files with 2 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ cmd_select_layout_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'p'))
previous = 1;
if (c->flags & CLIENT_CONTROL &&
if (c != NULL && c->flags & CLIENT_CONTROL &&
~c->flags & CLIENT_CONTROL_NEWLAYOUTS)
flags |= LAYOUT_CUSTOM_OLD_FORMAT;

View File

@@ -106,7 +106,7 @@ layout_free_cell(struct layout_cell *lc, int only_nodes)
}
break;
case LAYOUT_WINDOWPANE:
if (lc->wp != NULL) {
if (lc->wp != NULL && lc->wp->layout_cell != NULL) {
lc->wp->layout_cell->parent = NULL;
lc->wp->layout_cell = NULL;
}