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/ItemBoat.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/ItemBoat.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Items/ItemBoat.h b/src/Items/ItemBoat.h index be1663eef..ced5ec3a8 100644 --- a/src/Items/ItemBoat.h +++ b/src/Items/ItemBoat.h @@ -96,7 +96,12 @@ public: // Spawn block at water level cBoat * Boat = new cBoat(x + 0.5, y + 0.5, z + 0.5); - Boat->Initialize(*a_World); + if (!Boat->Initialize(*a_World)) + { + delete Boat; + Boat = nullptr; + return false; + } // Remove boat from players hand if (!a_Player->IsGameModeCreative()) |