mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 13:01:42 +00:00
Fixed: Invalid image width/height on error
--HG-- branch : develop
This commit is contained in:
parent
511a004827
commit
ad8059c345
1 changed files with 8 additions and 1 deletions
|
@ -3847,7 +3847,7 @@ namespace NLGUI
|
||||||
uint32 w, h;
|
uint32 w, h;
|
||||||
CBitmap::loadSize (image, w, h);
|
CBitmap::loadSize (image, w, h);
|
||||||
if (w == 0 || h == 0 || ((!NLMISC::isPowerOf2(w) || !NLMISC::isPowerOf2(h)) && !NL3D::CTextureFile::supportNonPowerOfTwoTextures()))
|
if (w == 0 || h == 0 || ((!NLMISC::isPowerOf2(w) || !NLMISC::isPowerOf2(h)) && !NL3D::CTextureFile::supportNonPowerOfTwoTextures()))
|
||||||
image.clear();
|
image = "web_del.tga";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3992,6 +3992,13 @@ namespace NLGUI
|
||||||
normal = "web_del.tga";
|
normal = "web_del.tga";
|
||||||
addImageDownload(normalBitmap, ctrlButton, style);
|
addImageDownload(normalBitmap, ctrlButton, style);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uint32 w, h;
|
||||||
|
CBitmap::loadSize(normal, w, h);
|
||||||
|
if (w == 0 || h == 0)
|
||||||
|
normal = "web_del.tga";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue