Skip to content

Commit

Permalink
Fix paperdoll dialog crash when equipment data isn't available for op…
Browse files Browse the repository at this point in the history
…en dialog
  • Loading branch information
ethanmoffat committed May 23, 2023
1 parent cc66372 commit c9cb43b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions EndlessClient/Dialogs/PaperdollDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ protected override void UpdateDisplayedData(PaperdollData paperdollData)
if (equipLocation == EquipLocation.PAPERDOLL_MAX)
break;

if (!paperdollData.Paperdoll.ContainsKey(equipLocation))
continue;

var id = paperdollData.Paperdoll[equipLocation];
var eifRecord = id.SomeWhen(i => i > 0).Map(i => _pubFileProvider.EIFFile[i]);
var paperdollItem = new PaperdollDialogItem(GraphicsManager, _sfxPlayer, _inventoryPanel, this, _isMainCharacter, equipLocation, eifRecord)
Expand Down

0 comments on commit c9cb43b

Please sign in to comment.