1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Fix tuto3 picture taken crash on all devices

A modification of the JavaCameraView is needed to avoid a crash when the
app is exited. It is a good practice to remove the callback after the
stopPreview method.
This commit is contained in:
poiuytrez
2013-05-01 16:58:15 +02:00
parent 60bf018781
commit bef6de9025
2 changed files with 5 additions and 2 deletions
@@ -179,6 +179,8 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
synchronized (this) {
if (mCamera != null) {
mCamera.stopPreview();
mCamera.setPreviewCallback(null);
mCamera.release();
}
mCamera = null;