mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-04-23 15:36:07 +00:00
Fix crash on item frame destruction
This commit is contained in:
parent
17a11d7913
commit
d7882b68a4
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue