[BUGFIX] Fix crash on empty mFaceDetector instance when face is not recognized
This commit is contained in:
parent
cebc2268a6
commit
cde5493870
|
@ -47,7 +47,7 @@ public class FaceDetectionErrorEvent extends Event<FaceDetectionErrorEvent> {
|
|||
|
||||
private WritableMap serializeEventData() {
|
||||
WritableMap map = Arguments.createMap();
|
||||
map.putBoolean("isOperational", mFaceDetector.isOperational());
|
||||
map.putBoolean("isOperational", mFaceDetector != null ? mFaceDetector.isOperational() : false);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue