1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

Fix crash on opening creature window with bonuses that don't have icon

This commit is contained in:
Ivan Savenko
2024-07-19 19:37:22 +00:00
parent 75fd67a921
commit e862b9c868

View File

@@ -196,7 +196,7 @@ Point SDLImageConst::dimensions() const
std::shared_ptr<IImage> SDLImageConst::createImageReference(EImageBlitMode mode)
{
if (surf->format->palette)
if (surf && surf->format->palette)
return std::make_shared<SDLImageIndexed>(shared_from_this(), mode);
else
return std::make_shared<SDLImageRGB>(shared_from_this(), mode);