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 dataToAdd) void MapItemSavedData::removeItemFrameDecoration(shared_ptr item) { - AUTO_VAR(frameDecoration, nonPlayerDecorations.find( item->getFrame()->entityId ) ); + if ( !item ) + return; + + std::shared_ptr frame = item->getFrame(); + if ( !frame ) + return; + + auto frameDecoration = nonPlayerDecorations.find(frame->entityId); if ( frameDecoration != nonPlayerDecorations.end() ) { delete frameDecoration->second;