Skip to content

Commit

Permalink
More explicitly state pointer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Oct 7, 2022
1 parent d5f5cc9 commit 7d41cd4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Components/Hlms/Pbs/src/Cubemaps/OgreCubemapProbe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,15 @@ namespace Ogre
{
if( !mCreator->getAutomaticMode() )
{
if( mTexture )
// A Workspace without a valid texture is never valid. If it happens it
// could mean the workspace is internally referencing a dangling pointer.
OGRE_ASSERT_LOW( mTexture );

const bool useManual = mTexture->getNumMipmaps() > 1u;
if( useManual )
{
const bool useManual = mTexture->getNumMipmaps() > 1u;
if( useManual )
{
TextureGpu *channel = mWorkspace->getExternalRenderTargets()[0];
mCreator->releaseTmpRtt( channel );
}
TextureGpu *channel = mWorkspace->getExternalRenderTargets()[0];
mCreator->releaseTmpRtt( channel );
}
}

Expand Down

0 comments on commit 7d41cd4

Please sign in to comment.