1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Fix crash on accepting turn in MP with settings window open

This commit is contained in:
Ivan Savenko
2025-02-01 12:17:17 +00:00
parent 386679294f
commit cf44186a11
3 changed files with 13 additions and 5 deletions

View File

@ -345,7 +345,7 @@ void WindowBase::close()
if(!GH.windows().isTopWindow(this))
{
auto topWindow = GH.windows().topWindow<IShowActivatable>().get();
throw std::runtime_error(std::string("Only top interface can be closed! Top window is ") + typeid(*this).name() + " but attempted to close " + typeid(*topWindow).name());
throw std::runtime_error(std::string("Only top interface can be closed! Top window is ") + typeid(*topWindow).name() + " but attempted to close " + typeid(*this).name());
}
GH.windows().popWindows(1);
}