Bugfix: Don’t crash when dock clients set the urgency hint (+testcase)

This commit is contained in:
Michael Stapelberg
2011-05-11 22:45:20 +02:00
parent 4be3178d4d
commit c62f70856f
2 changed files with 64 additions and 1 deletions

View File

@ -813,7 +813,11 @@ static int handle_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_w
//CLIENT_LOG(con);
LOG("Urgency flag changed to %d\n", con->urgent);
workspace_update_urgent_flag(con_get_workspace(con));
Con *ws;
/* Set the urgency flag on the workspace, if a workspace could be found
* (for dock clients, that is not the case). */
if ((ws = con_get_workspace(con)) != NULL)
workspace_update_urgent_flag(ws);
tree_render();