From c4d574732fcec73b58d9f9bbfdd8a1457ab09b8b Mon Sep 17 00:00:00 2001 From: karashiiro <49822414+karashiiro@users.noreply.github.com> Date: Sun, 25 Jul 2021 10:49:20 -0700 Subject: [PATCH] fix(Network): avoid passing null object into purchase handler --- Dalamud/Game/Network/NetworkHandlers.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dalamud/Game/Network/NetworkHandlers.cs b/Dalamud/Game/Network/NetworkHandlers.cs index 1a77830e4..0b7aa7694 100644 --- a/Dalamud/Game/Network/NetworkHandlers.cs +++ b/Dalamud/Game/Network/NetworkHandlers.cs @@ -282,7 +282,8 @@ namespace Dalamud.Game.Network || purchase.CatalogId == this.marketBoardPurchaseHandler.CatalogId + 1000000)) { // HQ Log.Information("Bought " + purchase.ItemQuantity + "x " + this.marketBoardPurchaseHandler.CatalogId + " for " + (this.marketBoardPurchaseHandler.PricePerUnit * purchase.ItemQuantity) + " gils, listing id is " + this.marketBoardPurchaseHandler.ListingId); - Task.Run(() => this.uploader.UploadPurchase(this.marketBoardPurchaseHandler)); + var handler = this.marketBoardPurchaseHandler; // Capture the object so that we don't pass in a null one when the task starts. + Task.Run(() => this.uploader.UploadPurchase(handler)); } this.marketBoardPurchaseHandler = null;