1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

multiple fixes

This commit is contained in:
Laserlicht
2025-09-16 01:29:54 +02:00
parent 134c145b98
commit 2bf9454b77
4 changed files with 11 additions and 2 deletions

View File

@@ -99,7 +99,12 @@ public:
const TResource & operator[](size_t index) const
{
return container.at(GameResID(index));
auto it = container.find(GameResID(index));
if (it != container.end())
return it->second;
static const TResource default_resource{};
return default_resource;
}
bool empty () const