1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Don't use height cull callback when there's no terrain

This commit is contained in:
Alexei Kotov 2024-01-19 11:55:37 +03:00
parent 6ead5f9321
commit ffa52dfe7c

View File

@ -145,7 +145,7 @@ namespace Terrain
osg::Callback* World::getHeightCullCallback(float highz, unsigned int mask)
{
if (!mHeightCullCallback)
if (!mHeightCullCallback || mTerrainRoot->getNumChildren() == 0)
return nullptr;
mHeightCullCallback->setHighZ(highz);