diff options
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()) { |