From: Simon Elsbrock Date: Thu, 27 Sep 2012 06:35:09 +0000 (+0200) Subject: fix crash: urgent floating con on separate workspace (thanks Piotr) X-Git-Tag: 4.4~107 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=87525ad2d6759b728f8345cc0ee87b3557c81797;p=i3%2Fi3 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 --- 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 {