summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemBed.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items/ItemBed.h')
-rw-r--r--src/Items/ItemBed.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Items/ItemBed.h b/src/Items/ItemBed.h
index a2e254171..77818e7c7 100644
--- a/src/Items/ItemBed.h
+++ b/src/Items/ItemBed.h
@@ -27,7 +27,10 @@ public:
auto & World = *a_Player.GetWorld();
BLOCKTYPE HeadType;
NIBBLETYPE HeadMeta;
- World.GetBlockTypeMeta(HeadPosition, HeadType, HeadMeta);
+ if (!World.GetBlockTypeMeta(HeadPosition, HeadType, HeadMeta))
+ {
+ return false;
+ }
// Vanilla only allows beds to be placed into air.
// Check if there is empty space for the "head" block: