NullPointerException in case of error on opening native camera fixed.
This commit is contained in:
parent
5ce4e3c265
commit
456c56fe90
@ -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 {
|
|||||||
mThread = null;
|
mThread = null;
|
||||||
mStopThread = false;
|
mStopThread = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Now release camera */
|
/* Now release camera */
|
||||||
releaseCamera();
|
releaseCamera();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user