summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemMinecart.h
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-05-02 13:16:59 +0200
committerLukas Pioch <lukas@zgow.de>2017-05-08 06:31:45 +0200
commit5580d558a5ede21f856d7b77c3f1ab99a4f088c4 (patch)
tree24772f12098aac2d4576ca6a46bbec47a188f282 /src/Items/ItemMinecart.h
parentCorrected brewingstand and added support for fuel (diff)
downloadcuberite-5580d558a5ede21f856d7b77c3f1ab99a4f088c4.tar
cuberite-5580d558a5ede21f856d7b77c3f1ab99a4f088c4.tar.gz
cuberite-5580d558a5ede21f856d7b77c3f1ab99a4f088c4.tar.bz2
cuberite-5580d558a5ede21f856d7b77c3f1ab99a4f088c4.tar.lz
cuberite-5580d558a5ede21f856d7b77c3f1ab99a4f088c4.tar.xz
cuberite-5580d558a5ede21f856d7b77c3f1ab99a4f088c4.tar.zst
cuberite-5580d558a5ede21f856d7b77c3f1ab99a4f088c4.zip
Diffstat (limited to 'src/Items/ItemMinecart.h')
-rw-r--r--src/Items/ItemMinecart.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Items/ItemMinecart.h b/src/Items/ItemMinecart.h
index 6344c0178..623342d41 100644
--- a/src/Items/ItemMinecart.h
+++ b/src/Items/ItemMinecart.h
@@ -73,7 +73,12 @@ public:
return false;
}
} // switch (m_ItemType)
- Minecart->Initialize(*a_World);
+ if (!Minecart->Initialize(*a_World))
+ {
+ delete Minecart;
+ Minecart = nullptr;
+ return false;
+ }
if (!a_Player->IsGameModeCreative())
{