Handle exception thrown when calling disposed camera
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -226,7 +226,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
{
if (_camera != null)
{
- _cameraCapture.A
_camera.Release();
_camera.Dispose();
_isCameraRunning = false;
@@ -266,9 +265,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
_camera = new VideoCapture();
_camera.Open(0);
- if (_camera.IsOpened())
- {
- while (_isCameraRunning)
+ while (_camera.IsOpened())
{
_camera.Read(_frame);
if (!_frame.Empty())
@@ -280,7 +277,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
}
}
}
- }
private WriteableBitmap? ConvertMatToWriteableBitmap(Mat frame)
{

Handle exception thrown when calling disposed camera