Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Minecraft.World/MultiEntityMobPart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ bool MultiEntityMobPart::isPickable()

bool MultiEntityMobPart::hurt(DamageSource *source, float damage)
{
return parentMob.lock()->hurt( dynamic_pointer_cast<MultiEntityMobPart>( shared_from_this() ), source, damage);
if (auto parent = parentMob.lock()) {
return parent->hurt(dynamic_pointer_cast<MultiEntityMobPart>(shared_from_this()), source, damage);
}
// If the parent doesn't exist, safely ignore the damage to avoid the Crashing
return false;
}

bool MultiEntityMobPart::is(shared_ptr<Entity> other)
Expand Down