1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Do not attempt to answer non-existing query

This commit is contained in:
Ivan Savenko 2024-01-18 22:21:07 +02:00
parent 3d62863ce6
commit b2527c3775

View File

@ -1676,6 +1676,7 @@ void CPlayerInterface::showTavernWindow(const CGObjectInstance * object, const C
{ {
EVENT_HANDLER_CALLED_BY_CLIENT; EVENT_HANDLER_CALLED_BY_CLIENT;
auto onWindowClosed = [this, queryID](){ auto onWindowClosed = [this, queryID](){
if (queryID != QueryID::NONE)
cb->selectionMade(0, queryID); cb->selectionMade(0, queryID);
}; };
GH.windows().createAndPushWindow<CTavernWindow>(object, onWindowClosed); GH.windows().createAndPushWindow<CTavernWindow>(object, onWindowClosed);