diff --git a/NAPS2.Sdk/Scan/Internal/Apple/DeviceOperator.cs b/NAPS2.Sdk/Scan/Internal/Apple/DeviceOperator.cs index e7fd57d18b..13d1df11c5 100644 --- a/NAPS2.Sdk/Scan/Internal/Apple/DeviceOperator.cs +++ b/NAPS2.Sdk/Scan/Internal/Apple/DeviceOperator.cs @@ -128,8 +128,10 @@ public override void DidScanToBandData(ICScannerDevice scanner, ICScannerBandDat _buffer = null; var tcs = new TaskCompletionSource(); // Ensure sequencing is maintained when writing to the callback even if copy tasks finish out of order - _writeToCallback = (_writeToCallback ?? Task.CompletedTask).ContinueWith(async _ => + var previousCallback = _writeToCallback ?? Task.CompletedTask; + _writeToCallback = Task.Run(async () => { + await previousCallback; var image = await tcs.Task; if (image != null) {