aboutsummaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 590c3f2f5..a1389fd10 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -152,14 +152,8 @@ MapBlock * Map::getBlockNoCreate(v3s16 p3d)
bool Map::isNodeUnderground(v3s16 p)
{
v3s16 blockpos = getNodeBlockPos(p);
- try{
- MapBlock * block = getBlockNoCreate(blockpos);
- return block->getIsUnderground();
- }
- catch(InvalidPositionException &e)
- {
- return false;
- }
+ MapBlock *block = getBlockNoCreateNoEx(blockpos);
+ return block && block->getIsUnderground();
}
bool Map::isValidPosition(v3s16 p)