From ebce9a648edbe493f0584c1c434603443d462d8c Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Sun, 5 Jan 2025 14:38:34 -0300 Subject: [PATCH] Fix false positive assert when destroying CubemapProbes HlmsPbsDatablock must inform CubemapProbe when it is destroyed --- Components/Hlms/Pbs/src/OgreHlmsPbsDatablock.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Components/Hlms/Pbs/src/OgreHlmsPbsDatablock.cpp b/Components/Hlms/Pbs/src/OgreHlmsPbsDatablock.cpp index 6c29a002557..454644e4963 100644 --- a/Components/Hlms/Pbs/src/OgreHlmsPbsDatablock.cpp +++ b/Components/Hlms/Pbs/src/OgreHlmsPbsDatablock.cpp @@ -352,6 +352,11 @@ namespace Ogre //----------------------------------------------------------------------------------- HlmsPbsDatablock::~HlmsPbsDatablock() { + if( mCubemapProbe ) + { + mCubemapProbe->_removeReference(); + mCubemapProbe = 0; + } if( mAssignedPool ) static_cast( mCreator )->releaseSlot( this ); }