From 14c283a623a1c9c0015f04865655df7a225bedf9 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 5 Jun 2022 18:59:53 +0200 Subject: Fix crash in commit a69b7abe00fb818fd88f3cd04e7f9997ffd21072 --- src/serverenvironment.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/serverenvironment.cpp') 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 -- cgit v1.2.3