Skip to content

Commit e834f00

Browse files
committed
fix NPE
Signed-off-by: Umair Khan <[email protected]>
1 parent f719c4c commit e834f00

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/in/omerjerk/processing/video/android/Capture.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ public Camera getCamera() {
187187
}
188188

189189
public static void printCompatibleResolutionsList(Capture capture) {
190-
Camera camera = capture.getCamera();
190+
Camera camera = null;
191+
if (capture != null) {
192+
camera = capture.getCamera();
193+
}
191194
boolean selfOpen = false;
192195
if (camera == null) {
193196
camera = Camera.open(0);

0 commit comments

Comments
 (0)