Merge pull request #1733 from ItsDrike/master

pull/1736/head
Alex 2022-10-18 19:45:42 +02:00 committed by GitHub
commit dea2d721eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,10 @@ std::string Window::getLastWindowTitle(uint workspaceID) {
auto workspace = std::find_if(json.begin(), json.end(), [&](Json::Value workspace) { auto workspace = std::find_if(json.begin(), json.end(), [&](Json::Value workspace) {
return workspace["id"].as<uint>() == workspaceID; return workspace["id"].as<uint>() == workspaceID;
}); });
assert(workspace != std::end(json));
if (workspace != std::end(json)) {
return "";
}
return (*workspace)["lastwindowtitle"].as<std::string>(); return (*workspace)["lastwindowtitle"].as<std::string>();
} }