Skip to content

Commit

Permalink
Material: Fixed cleanup of materials waiting to be initialised.
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonJoker committed Apr 5, 2024
1 parent 435abca commit e61c95d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
5 changes: 0 additions & 5 deletions source/Core/Castor3D/Material/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@ namespace castor3d

void Material::cleanup()
{
if ( !m_initialised )
{
return;
}

m_initialised = false;

for ( auto const & pass : m_passes )
Expand Down
7 changes: 2 additions & 5 deletions source/Core/Castor3D/Material/Pass/Pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,8 @@ namespace castor3d

void Pass::cleanup()
{
if ( m_initialised )
{
m_initialised = false;
getOwner()->getOwner()->getMaterialCache().unregisterPass( *this );
}
m_initialised = false;
getOwner()->getOwner()->getMaterialCache().unregisterPass( *this );
}

void Pass::update()
Expand Down

0 comments on commit e61c95d

Please sign in to comment.