1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Try to localize crash on missing combat animation

This commit is contained in:
Ivan Savenko 2024-06-17 13:24:07 +00:00
parent 6b9d2809b1
commit 4f64b1f7e6

View File

@ -637,6 +637,9 @@ CCreaturePic::CCreaturePic(int x, int y, const CCreature * cre, bool Big, bool A
assert(CGI->townh->size() > faction);
if (cre->animDefName.empty())
throw std::runtime_error("Creature " + cre->getJsonKey() + " has no valid combat animation!");
if(Big)
bg = std::make_shared<CPicture>((*CGI->townh)[faction]->creatureBg130);
else