summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHoe.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items/ItemHoe.h')
-rw-r--r--src/Items/ItemHoe.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Items/ItemHoe.h b/src/Items/ItemHoe.h
index 2bca5f5ca..503047328 100644
--- a/src/Items/ItemHoe.h
+++ b/src/Items/ItemHoe.h
@@ -46,7 +46,10 @@ public:
// Can only transform dirt or grass blocks:
BLOCKTYPE BlockType;
NIBBLETYPE BlockMeta;
- a_World->GetBlockTypeMeta(a_ClickedBlockPos, BlockType, BlockMeta);
+ if (!a_World->GetBlockTypeMeta(a_ClickedBlockPos, BlockType, BlockMeta))
+ {
+ return false;
+ }
if ((BlockType != E_BLOCK_DIRT) && (BlockType != E_BLOCK_GRASS))
{
return false;