From 1503f914460cd3e24492a03b462a5169e55a643f Mon Sep 17 00:00:00 2001 From: Dane Jensen Date: Mon, 20 Jul 2026 21:18:29 -0700 Subject: [PATCH] Fixed two null dereferences. --- cmd-select-layout.c | 2 +- layout.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd-select-layout.c b/cmd-select-layout.c index 106b8ce7b..93cdb413b 100644 --- a/cmd-select-layout.c +++ b/cmd-select-layout.c @@ -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; diff --git a/layout.c b/layout.c index edf4eab7e..6cca384a8 100644 --- a/layout.c +++ b/layout.c @@ -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; }