mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix(Network): avoid passing null object into purchase handler
This commit is contained in:
parent
ce47ccb151
commit
c4d574732f
1 changed files with 2 additions and 1 deletions
|
|
@ -282,7 +282,8 @@ namespace Dalamud.Game.Network
|
||||||
|| purchase.CatalogId == this.marketBoardPurchaseHandler.CatalogId + 1000000))
|
|| purchase.CatalogId == this.marketBoardPurchaseHandler.CatalogId + 1000000))
|
||||||
{ // HQ
|
{ // HQ
|
||||||
Log.Information("Bought " + purchase.ItemQuantity + "x " + this.marketBoardPurchaseHandler.CatalogId + " for " + (this.marketBoardPurchaseHandler.PricePerUnit * purchase.ItemQuantity) + " gils, listing id is " + this.marketBoardPurchaseHandler.ListingId);
|
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;
|
this.marketBoardPurchaseHandler = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue