mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(Workspaces): check thread is running before parse response
This commit is contained in:
parent
171e0e5ae3
commit
f8116132a7
@ -28,7 +28,9 @@ void waybar::modules::sway::Workspaces::worker()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto res = ipc_.sendCmd(IPC_GET_WORKSPACES);
|
||||
workspaces_ = parser_.parse(res.payload);
|
||||
if (thread_.isRunning()) {
|
||||
workspaces_ = parser_.parse(res.payload);
|
||||
}
|
||||
}
|
||||
dp.emit();
|
||||
} catch (const std::exception& e) {
|
||||
|
Loading…
Reference in New Issue
Block a user