mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-09 04:15:40 -04:00
improve error report when windowId is invalid.
This commit is contained in:
parent
593988e82b
commit
9fe420e562
@ -2408,7 +2408,10 @@ namespace MWGui
|
||||
|
||||
bool WindowManager::isWindowVisible(std::string_view windowId) const
|
||||
{
|
||||
return mLuaIdToWindow.at(windowId)->isVisible();
|
||||
auto it = mLuaIdToWindow.find(windowId);
|
||||
if (it == mLuaIdToWindow.end())
|
||||
throw std::logic_error("Invalid window name: " + std::string(windowId));
|
||||
return it->second->isVisible();
|
||||
}
|
||||
|
||||
std::vector<std::string_view> WindowManager::getAllWindowIds() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user