1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #854 from asmorkalov:android_null_invalid_cam

This commit is contained in:
Andrey Pavlenko
2013-04-30 17:36:39 +04:00
committed by OpenCV Buildbot
@@ -53,14 +53,16 @@ public class NativeCameraView extends CameraBridgeViewBase {
/* 1. We need to stop thread which updating the frames
* 2. Stop camera and release it
*/
try {
mStopThread = true;
mThread.join();
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
mThread = null;
mStopThread = false;
if (mThread != null) {
try {
mStopThread = true;
mThread.join();
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
mThread = null;
mStopThread = false;
}
}
/* Now release camera */