summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-06-05 18:59:53 +0200
committersfan5 <sfan5@live.de>2022-06-05 19:00:14 +0200
commit14c283a623a1c9c0015f04865655df7a225bedf9 (patch)
treed03d900108d8d82a3e17ac4d15126c0f97aec09c
parent4baf56520d61e22687b563d403f5d873251e135f (diff)
downloadminetest-14c283a623a1c9c0015f04865655df7a225bedf9.tar.gz
minetest-14c283a623a1c9c0015f04865655df7a225bedf9.tar.bz2
minetest-14c283a623a1c9c0015f04865655df7a225bedf9.zip
Fix crash in commit a69b7abe00fb818fd88f3cd04e7f9997ffd21072
-rw-r--r--src/serverenvironment.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index 39cd7aa64..8989fb05f 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -258,6 +258,7 @@ void LBMManager::applyLBMs(ServerEnvironment *env, MapBlock *block, u32 stamp)
v3s16 pos;
MapNode n;
content_t c;
+ bool pos_valid; // dummy, we know it's valid
auto it = getLBMsIntroducedAfter(stamp);
for (; it != m_lbm_lookup.end(); ++it) {
// Cache previous version to speedup lookup which has a very high performance
@@ -268,7 +269,7 @@ void LBMManager::applyLBMs(ServerEnvironment *env, MapBlock *block, u32 stamp)
for (pos.X = 0; pos.X < MAP_BLOCKSIZE; pos.X++)
for (pos.Y = 0; pos.Y < MAP_BLOCKSIZE; pos.Y++)
for (pos.Z = 0; pos.Z < MAP_BLOCKSIZE; pos.Z++) {
- n = block->getNodeNoCheck(pos, nullptr);
+ n = block->getNodeNoCheck(pos, &pos_valid);
c = n.getContent();
// If content_t are not matching perform an LBM lookup