mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
NullPointerException in case of error on opening native camera fixed.
This commit is contained in:
parent
5ce4e3c265
commit
456c56fe90
@ -53,14 +53,16 @@ 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
|
||||||
*/
|
*/
|
||||||
try {
|
if (mThread != null) {
|
||||||
mStopThread = true;
|
try {
|
||||||
mThread.join();
|
mStopThread = true;
|
||||||
} catch (InterruptedException e) {
|
mThread.join();
|
||||||
e.printStackTrace();
|
} catch (InterruptedException e) {
|
||||||
} finally {
|
e.printStackTrace();
|
||||||
mThread = null;
|
} finally {
|
||||||
mStopThread = false;
|
mThread = null;
|
||||||
|
mStopThread = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now release camera */
|
/* Now release camera */
|
||||||
|
Loading…
Reference in New Issue
Block a user