From 1849372c0f9fa678e3f65870e6cfae0b04b0212d Mon Sep 17 00:00:00 2001 From: Florian Maunier Date: Sat, 23 Nov 2024 11:11:08 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20(contextmenu)=20fix=20unhand?= =?UTF-8?q?led=20exception=20if=20item=20not=20in=20Item=20sheet=20(eg.=20?= =?UTF-8?q?key=20items)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MarketBoardPlugin/MBPlugin.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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, }); } From 9de6f1e07d7448ecc14db96355ee7b9f5094e44d Mon Sep 17 00:00:00 2001 From: Florian Maunier Date: Sat, 23 Nov 2024 11:12:16 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=96=20bump=20version=20to=201.9.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MarketBoardPlugin/MarketBoardPlugin.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 +