Merge pull request #854 from asmorkalov:android_null_invalid_cam

pull/862/head
Andrey Pavlenko 12 years ago committed by OpenCV Buildbot
commit 48a8aefd6b
  1. 18
      modules/java/generator/src/java/android+NativeCameraView.java

@ -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 */

Loading…
Cancel
Save