1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00

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

View file

@ -114,6 +114,13 @@ namespace modules {
} }
bool i3_module::update() { 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(); m_workspaces.clear();
i3_util::connection_t ipc; i3_util::connection_t ipc;