mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #1733 from ItsDrike/master
This commit is contained in:
commit
dea2d721eb
@ -59,7 +59,10 @@ std::string Window::getLastWindowTitle(uint workspaceID) {
|
||||
auto workspace = std::find_if(json.begin(), json.end(), [&](Json::Value workspace) {
|
||||
return workspace["id"].as<uint>() == workspaceID;
|
||||
});
|
||||
assert(workspace != std::end(json));
|
||||
|
||||
if (workspace != std::end(json)) {
|
||||
return "";
|
||||
}
|
||||
return (*workspace)["lastwindowtitle"].as<std::string>();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user