1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0032912: Visualization - crash when displaying an OBJ file with missing texture file

Fix NULL dereference within Graphic3d_TextureRoot::convertToCompatible() due to wrong order of checks.
This commit is contained in:
kgv 2022-04-06 01:26:00 +03:00
parent f15afeb84b
commit c004c09c9e

View File

@ -214,9 +214,9 @@ Handle(Image_PixMap) Graphic3d_TextureRoot::GetImage (const Handle(Image_Support
void Graphic3d_TextureRoot::convertToCompatible (const Handle(Image_SupportedFormats)& theSupported,
const Handle(Image_PixMap)& theImage)
{
if (theSupported.IsNull()
|| theSupported->IsSupported (theImage->Format())
|| theImage.IsNull())
if (theImage.IsNull()
|| theSupported.IsNull()
|| theSupported->IsSupported (theImage->Format()))
{
return;
}