engine: imagelib: img_ktx2: don't allow to load images with no mip levels
This commit is contained in:
parent
683c4874f8
commit
a675806c91
1 changed files with 6 additions and 0 deletions
|
@ -87,6 +87,12 @@ static qboolean Image_KTX2Parse( const ktx2_header_t *header, const byte *buffer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( header->levelCount == 0 )
|
||||||
|
{
|
||||||
|
Con_DPrintf( S_ERROR "%s: file has no mip levels\n", __FUNCTION__ );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( header->pixelDepth > 1 )
|
if( header->pixelDepth > 1 )
|
||||||
{
|
{
|
||||||
Con_DPrintf( S_ERROR "%s: unsupported KTX2 pixelDepth %d\n", __FUNCTION__, header->pixelDepth );
|
Con_DPrintf( S_ERROR "%s: unsupported KTX2 pixelDepth %d\n", __FUNCTION__, header->pixelDepth );
|
||||||
|
|
Loading…
Add table
Reference in a new issue