diff --git a/java/libraries/video/examples/Capture/GettingStartedCapture/GettingStartedCapture.pde b/java/libraries/video/examples/Capture/GettingStartedCapture/GettingStartedCapture.pde index 33163dc0e..517ba8786 100644 --- a/java/libraries/video/examples/Capture/GettingStartedCapture/GettingStartedCapture.pde +++ b/java/libraries/video/examples/Capture/GettingStartedCapture/GettingStartedCapture.pde @@ -13,11 +13,13 @@ void setup() { String[] cameras = Capture.list(); - if (cameras.length == 0) { + if (cameras == null) { + println("Failed to retrieve the list of available cameras, will try the default..."); + cam = new Capture(this, 640, 480); + } if (cameras.length == 0) { println("There are no cameras available for capture."); exit(); - } - else { + } else { println("Available cameras:"); for (int i = 0; i < cameras.length; i++) { println(cameras[i]);