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
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 {