diff --git a/MarketBoardPlugin/MBPlugin.cs b/MarketBoardPlugin/MBPlugin.cs index e1aef19..b3c3b2f 100644 --- a/MarketBoardPlugin/MBPlugin.cs +++ b/MarketBoardPlugin/MBPlugin.cs @@ -271,7 +271,13 @@ private void OnContextMenuOpened(IMenuOpenedArgs args) return; } - var item = this.DataManager.Excel.GetSheet()?.GetRow(itemId); + var item = this.DataManager.Excel.GetSheet().GetRowOrDefault(itemId); + + if (!item.HasValue) + { + this.Log.Warning("Failed to get item data for item ID {0}", itemId); + return; + } args.AddMenuItem(new MenuItem { @@ -279,7 +285,7 @@ private void OnContextMenuOpened(IMenuOpenedArgs args) OnClicked = this.GetMenuItemClickedHandler(itemId), Prefix = SeIconChar.BoxedLetterM, PrefixColor = 48, - IsEnabled = !(item?.IsUntradable ?? true), + IsEnabled = !item.Value.IsUntradable, }); } diff --git a/MarketBoardPlugin/MarketBoardPlugin.csproj b/MarketBoardPlugin/MarketBoardPlugin.csproj index 743bdfa..cbaa4d9 100644 --- a/MarketBoardPlugin/MarketBoardPlugin.csproj +++ b/MarketBoardPlugin/MarketBoardPlugin.csproj @@ -5,9 +5,9 @@ bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml PdbOnly true - 1.9.0 - 1.9.0 - 1.9.0 + 1.9.1 + 1.9.1 + 1.9.1 Florian Maunier Market board plugin for Dalamud. Copyright (c) Florian Maunier. All rights reserved. @@ -49,4 +49,4 @@ - \ No newline at end of file +