Skip to content

Commit

Permalink
Apple: Fix resetting buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Dec 23, 2024
1 parent 6757bba commit 59ab856
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions NAPS2.Sdk/Scan/Internal/Apple/DeviceOperator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public override void DidScanToBandData(ICScannerDevice scanner, ICScannerBandDat
{
_logger.LogDebug("DidScanToBandData buffer complete");
var fullBuffer = _buffer;
_buffer = null;
var tcs = new TaskCompletionSource<IMemoryImage?>();
// Ensure sequencing is maintained when writing to the callback even if copy tasks finish out of order
_writeToCallback = (_writeToCallback ?? Task.CompletedTask).ContinueWith(async _ =>
Expand Down

0 comments on commit 59ab856

Please sign in to comment.