1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

Fix crash on transparency test on null surface

This commit is contained in:
Ivan Savenko 2024-06-17 17:09:19 +00:00
parent 9917db71cc
commit dd045e2dc7

View File

@ -235,7 +235,10 @@ void SDLImage::setFlagColor(PlayerColor player)
bool SDLImage::isTransparent(const Point & coords) const
{
return CSDL_Ext::isTransparent(surf, coords.x, coords.y);
if (surf)
return CSDL_Ext::isTransparent(surf, coords.x, coords.y);
else
return true;
}
Point SDLImage::dimensions() const