[BUGFIX] Fix crash on empty mFaceDetector instance when face is not recognized

This commit is contained in:
Oscar Franco 2018-01-09 12:56:58 +01:00
parent cebc2268a6
commit cde5493870
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}