diff options
author | Lukas Pioch <lukas@zgow.de> | 2017-05-02 13:16:59 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-05-08 06:31:45 +0200 |
commit | 5580d558a5ede21f856d7b77c3f1ab99a4f088c4 (patch) | |
tree | 24772f12098aac2d4576ca6a46bbec47a188f282 /src/Items/ItemMinecart.h | |
parent | Corrected brewingstand and added support for fuel (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/Items/ItemMinecart.h | 7 |
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()) { |