Fix crash when lighting is enabled, and the liquid mesher is null.

This commit is contained in:
Relintai 2021-04-18 19:16:29 +02:00
parent 07788b6e8d
commit 0043df1c1d

View File

@ -203,6 +203,7 @@ void TerraTerrarinJob::phase_terrarin_mesh() {
}
if (should_do()) {
if (_liquid_mesher.is_valid()) {
_liquid_mesher->bake_colors(_chunk);
if (should_return()) {
@ -210,6 +211,7 @@ void TerraTerrarinJob::phase_terrarin_mesh() {
}
}
}
}
if (_mesher->get_vertex_count() == 0 && (!_liquid_mesher.is_valid() || _liquid_mesher->get_vertex_count() == 0)) {
reset_stages();