aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/MapItemSavedData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/MapItemSavedData.cpp')
-rw-r--r--Minecraft.World/MapItemSavedData.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Minecraft.World/MapItemSavedData.cpp b/Minecraft.World/MapItemSavedData.cpp
index 6304aa62..981bab3e 100644
--- a/Minecraft.World/MapItemSavedData.cpp
+++ b/Minecraft.World/MapItemSavedData.cpp
@@ -596,7 +596,14 @@ void MapItemSavedData::mergeInMapData(shared_ptr<MapItemSavedData> dataToAdd)
void MapItemSavedData::removeItemFrameDecoration(shared_ptr<ItemInstance> item)
{
- AUTO_VAR(frameDecoration, nonPlayerDecorations.find( item->getFrame()->entityId ) );
+ if ( !item )
+ return;
+
+ std::shared_ptr<ItemFrame> frame = item->getFrame();
+ if ( !frame )
+ return;
+
+ auto frameDecoration = nonPlayerDecorations.find(frame->entityId);
if ( frameDecoration != nonPlayerDecorations.end() )
{
delete frameDecoration->second;