fix(Workspaces): check thread is running before parse response
parent
171e0e5ae3
commit
f8116132a7
|
@ -28,8 +28,10 @@ void waybar::modules::sway::Workspaces::worker()
|
|||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto res = ipc_.sendCmd(IPC_GET_WORKSPACES);
|
||||
if (thread_.isRunning()) {
|
||||
workspaces_ = parser_.parse(res.payload);
|
||||
}
|
||||
}
|
||||
dp.emit();
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "Workspaces: " << e.what() << std::endl;
|
||||
|
|
Loading…
Reference in New Issue