- fixed crash caused by broken saved game picture

https://forum.zdoom.org/viewtopic.php?t=64244
This commit is contained in:
alexey.lysiuk 2019-04-12 18:20:27 +03:00
parent c0b322c51a
commit 61a8f122f0

View file

@ -499,7 +499,7 @@ unsigned FSavegameManager::ExtractSaveData(int index)
{
SavePic = PNGTexture_CreateFromFile(png, node->Filename);
delete png;
if (SavePic->GetDisplayWidth() == 1 && SavePic->GetDisplayHeight() == 1)
if (SavePic && SavePic->GetDisplayWidth() == 1 && SavePic->GetDisplayHeight() == 1)
{
delete SavePic;
SavePic = nullptr;