mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Prevent assertion on invalid opacities.
Instead, just clamp the value
This commit is contained in:
parent
d9cf5e8278
commit
8516cf6fe0
@ -1424,13 +1424,12 @@ void RENDER_3D_RAYTRACE_BASE::addModels( CONTAINER_3D& aDstContainer, const S3DM
|
||||
wxASSERT( a3DModel->m_Meshes != nullptr );
|
||||
wxASSERT( a3DModel->m_MaterialsSize > 0 );
|
||||
wxASSERT( a3DModel->m_MeshesSize > 0 );
|
||||
wxASSERT( aFPOpacity > 0.0f );
|
||||
wxASSERT( aFPOpacity <= 1.0f );
|
||||
|
||||
if( aFPOpacity > 1.0f )
|
||||
{
|
||||
aFPOpacity = 1.0f;
|
||||
}
|
||||
|
||||
if( aFPOpacity < 0.0f )
|
||||
aFPOpacity = 0.0f;
|
||||
|
||||
if( ( a3DModel->m_Materials != nullptr ) && ( a3DModel->m_Meshes != nullptr )
|
||||
&& ( a3DModel->m_MaterialsSize > 0 ) && ( a3DModel->m_MeshesSize > 0 ) )
|
||||
|
Loading…
Reference in New Issue
Block a user