Skip to content

Commit

Permalink
Fix crash when saving avatars without heads
Browse files Browse the repository at this point in the history
Yes, this can actually happen.
  • Loading branch information
riperiperi committed Nov 28, 2024
1 parent 7e9b0d2 commit 97d92bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void Save(VMAvatar avatar)
saveDaywear = saveDaywear || (bID == 0x24E0000000D || bID == 0x10000000D);
BodyOutfit = (saveDaywear)?avatar.DefaultSuits.Daywear.ID : bID;

HeadOutfit = avatar.HeadOutfit.ID;
HeadOutfit = avatar.HeadOutfit?.ID ?? 0;
Name = avatar.Name;
Permissions = avatar.AvatarState.Permissions;
AvatarFlags = ((VMTSOAvatarState)avatar.TSOState).Flags;
Expand Down

0 comments on commit 97d92bf

Please sign in to comment.