mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Fixed: A strange loading crash with bad textures
This commit is contained in:
parent
9e1702af57
commit
4739dfef9b
1 changed files with 7 additions and 0 deletions
|
@ -868,6 +868,13 @@ bool CDriverD3D::uploadTextureInternal (ITexture& tex, CRect& rect, uint8 destMi
|
|||
D3DFORMAT destFormat, D3DFORMAT srcFormat)
|
||||
{
|
||||
H_AUTO_D3D(CDriverD3D_uploadTextureInternal)
|
||||
|
||||
if (rect.Width == 0 || rect.Height == 0)
|
||||
{
|
||||
nlwarning("Rectangle width or height cannot be 0");
|
||||
return false;
|
||||
}
|
||||
|
||||
// The D3D texture
|
||||
CTextureDrvInfosD3D* d3dtext = getTextureD3D(tex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue