Add OpenCVException handling
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -299,6 +299,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
private void InsertAddressFromQRIfAble(Mat frame)
{
QRCodeDetector qRCodeDetector = new();
+ try
+ {
if (qRCodeDetector.Detect(frame, out Point2f[] points))
{
string qrCode = qRCodeDetector.Decode(frame, points, new Mat());
@@ -308,8 +310,16 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
CloseWebCam();
}
}
+ }
+ catch (OpenCVException exc)
+ {
+ Logger.LogWarning(exc);
+ }
+ finally
+ {
qRCodeDetector.Dispose();
}
+ }
private void CloseWebCam()
{

Add OpenCVException handling