1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fixed false error messages on game startup

This commit is contained in:
Ivan Savenko
2023-03-31 01:28:56 +03:00
parent 6e28b6ed90
commit ea1d177c9b
3 changed files with 12 additions and 14 deletions

View File

@@ -98,8 +98,13 @@ void MapTileStorage::load(size_t index, const std::string & filename, EImageBlit
for(auto & entry : terrainAnimations)
{
entry = std::make_unique<CAnimation>(filename);
entry->preload();
if (!filename.empty())
{
entry = std::make_unique<CAnimation>(filename);
entry->preload();
}
else
entry = std::make_unique<CAnimation>();
for(size_t i = 0; i < entry->size(); ++i)
entry->getImage(i)->setBlitMode(blitMode);