diff --git a/panda/src/grutil/shaderTerrainMesh.cxx b/panda/src/grutil/shaderTerrainMesh.cxx index a0f3c34690..e8078f7b68 100644 --- a/panda/src/grutil/shaderTerrainMesh.cxx +++ b/panda/src/grutil/shaderTerrainMesh.cxx @@ -156,7 +156,9 @@ bool ShaderTerrainMesh::generate() { * the chunks, and the PNMImage is destroyed afterwards. */ void ShaderTerrainMesh::do_extract_heightfield() { - nassertv(_heightfield_tex->has_ram_image()); // Heightfield not in RAM, extract ram image first + if (!_heightfield_tex->has_ram_image()) { + _heightfield_tex->reload(); + } _heightfield_tex->store(_heightfield);