mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +01:00
Catch runtime exceptions from QR code decoder. #298
This commit is contained in:
@@ -77,6 +77,8 @@ public class QrCodeDecoder implements PreviewConsumer, PreviewCallback {
|
|||||||
result = reader.decode(bitmap);
|
result = reader.decode(bitmap);
|
||||||
} catch (ReaderException e) {
|
} catch (ReaderException e) {
|
||||||
return null; // No barcode found
|
return null; // No barcode found
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
return null; // Decoding failed due to bug in decoder
|
||||||
} finally {
|
} finally {
|
||||||
reader.reset();
|
reader.reset();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user