fix(i3): crash without <label-state> (#1591)

Fixes #975
This commit is contained in:
Ddone 2019-01-09 19:38:44 +02:00 committed by Patrick Ziegler
parent 4a506d429d
commit b728fea5be
1 changed files with 7 additions and 0 deletions

View File

@ -114,6 +114,13 @@ namespace modules {
}
bool i3_module::update() {
/*
* update only populates m_workspaces and those are only needed when
* <label-state> appears in the format
*/
if (!m_formatter->has(TAG_LABEL_STATE)) {
return true;
}
m_workspaces.clear();
i3_util::connection_t ipc;