mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
multiple fixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user