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
This commit is contained in:
parent
dcf95fd312
commit
87525ad2d6
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue