Commit 48a8aefd authored by Andrey Pavlenko's avatar Andrey Pavlenko Committed by OpenCV Buildbot

Merge pull request #854 from asmorkalov:android_null_invalid_cam

parents f21e99de 456c56fe
...@@ -53,6 +53,7 @@ public class NativeCameraView extends CameraBridgeViewBase { ...@@ -53,6 +53,7 @@ public class NativeCameraView extends CameraBridgeViewBase {
/* 1. We need to stop thread which updating the frames /* 1. We need to stop thread which updating the frames
* 2. Stop camera and release it * 2. Stop camera and release it
*/ */
if (mThread != null) {
try { try {
mStopThread = true; mStopThread = true;
mThread.join(); mThread.join();
...@@ -62,6 +63,7 @@ public class NativeCameraView extends CameraBridgeViewBase { ...@@ -62,6 +63,7 @@ public class NativeCameraView extends CameraBridgeViewBase {
mThread = null; mThread = null;
mStopThread = false; mStopThread = false;
} }
}
/* Now release camera */ /* Now release camera */
releaseCamera(); releaseCamera();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment