summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemItemFrame.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items/ItemItemFrame.h')
-rw-r--r--src/Items/ItemItemFrame.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Items/ItemItemFrame.h b/src/Items/ItemItemFrame.h
index 77a5bf47c..a670d6cac 100644
--- a/src/Items/ItemItemFrame.h
+++ b/src/Items/ItemItemFrame.h
@@ -38,11 +38,9 @@ public:
if (Block == E_BLOCK_AIR)
{
- cItemFrame * ItemFrame = new cItemFrame(a_BlockFace, a_BlockX, a_BlockY, a_BlockZ);
- if (!ItemFrame->Initialize(*a_World))
+ auto ItemFrame = cpp14::make_unique<cItemFrame>(a_BlockFace, a_BlockX, a_BlockY, a_BlockZ);
+ if (!ItemFrame->Initialize(std::move(ItemFrame), *a_World))
{
- delete ItemFrame;
- ItemFrame = nullptr;
return false;
}