From 87525ad2d6759b728f8345cc0ee87b3557c81797 Mon Sep 17 00:00:00 2001 From: Simon Elsbrock Date: Thu, 27 Sep 2012 08:35:09 +0200 Subject: [PATCH] fix crash: urgent floating con on separate workspace (thanks Piotr) If there is a single floating con on a separate workspace that is not focused, and this con becomes urgent, switching back to that workspace may result in a crash of i3. This is because while setting the urgency of parent containers, 'parent' may become NULL in case of floating containers. This commit checks the validity of parent. fixes #821 --- src/con.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/con.c b/src/con.c index db9ad5ee..0539c7ab 100644 --- a/src/con.c +++ b/src/con.c @@ -1424,7 +1424,7 @@ void con_update_parents_urgency(Con *con) { Con *parent = con->parent; bool new_urgency_value = con->urgent; - while (parent->type != CT_WORKSPACE && parent->type != CT_DOCKAREA) { + while (parent && parent->type != CT_WORKSPACE && parent->type != CT_DOCKAREA) { if (new_urgency_value) { parent->urgent = true; } else { -- 2.39.5