summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemPainting.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Items/ItemPainting.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Items/ItemPainting.h b/src/Items/ItemPainting.h
index dd35931dd..60a231d2b 100644
--- a/src/Items/ItemPainting.h
+++ b/src/Items/ItemPainting.h
@@ -70,8 +70,8 @@ public:
{ "BurningSkull" }
};
- cPainting * Painting = new cPainting(gPaintingTitlesList[a_World->GetTickRandomNumber(ARRAYCOUNT(gPaintingTitlesList) - 1)].Title, a_BlockFace, a_BlockX, a_BlockY, a_BlockZ);
- Painting->Initialize(*a_World);
+ auto Painting = cpp14::make_unique<cPainting>(gPaintingTitlesList[a_World->GetTickRandomNumber(ARRAYCOUNT(gPaintingTitlesList) - 1)].Title, a_BlockFace, a_BlockX, a_BlockY, a_BlockZ);
+ Painting->Initialize(std::move(Painting), *a_World);
if (!a_Player->IsGameModeCreative())
{