mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-17 04:46:35 +00:00
improve error report when windowId is invalid.
This commit is contained in:
parent
593988e82b
commit
9fe420e562
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue