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/ItemPainting.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 'src/Items/ItemPainting.h')
-rw-r--r-- | src/Items/ItemPainting.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Items/ItemPainting.h b/src/Items/ItemPainting.h index dd35931dd..3432583ca 100644 --- a/src/Items/ItemPainting.h +++ b/src/Items/ItemPainting.h @@ -71,7 +71,12 @@ public: }; cPainting * Painting = new cPainting(gPaintingTitlesList[a_World->GetTickRandomNumber(ARRAYCOUNT(gPaintingTitlesList) - 1)].Title, a_BlockFace, a_BlockX, a_BlockY, a_BlockZ); - Painting->Initialize(*a_World); + if (!Painting->Initialize(*a_World)) + { + delete Painting; + Painting = nullptr; + return false; + } if (!a_Player->IsGameModeCreative()) { |