Fix relative IDs in movetoworkspace crashing

This commit is contained in:
vaxerski 2022-05-30 14:18:46 +02:00
parent e81790f357
commit 7167be9c48

View file

@ -820,8 +820,8 @@ CWorkspace* CCompositor::getWorkspaceByString(const std::string& str) {
} }
try { try {
int id = std::stoi(str); std::string name = "";
return getWorkspaceByID(id); return getWorkspaceByID(getWorkspaceIDFromString(str, name));
} catch (std::exception& e) { } catch (std::exception& e) {
Debug::log(ERR, "Error in getWorkspaceByString, invalid id"); Debug::log(ERR, "Error in getWorkspaceByString, invalid id");
} }