From f0cb3317a0cf8333c03b0a45e3bb25c7490f85ef Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 10 Mar 2011 10:25:12 +0100 Subject: Add IPE infrastructure and make sure that cameras check grabber existence --- src/cameras/pf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/cameras/pf.c') diff --git a/src/cameras/pf.c b/src/cameras/pf.c index d32f62f..a39fd3d 100644 --- a/src/cameras/pf.c +++ b/src/cameras/pf.c @@ -208,10 +208,7 @@ static uint32_t uca_pf_destroy(struct uca_camera_t *cam) uint32_t uca_pf_init(struct uca_camera_t **cam, struct uca_grabber_t *grabber) { int num_ports; - if (pfPortInit(&num_ports) < 0) - return UCA_ERR_CAM_NOT_FOUND; - - if (pfDeviceOpen(0) < 0) + if ((grabber == NULL) || (pfPortInit(&num_ports) < 0) || (pfDeviceOpen(0) < 0)) return UCA_ERR_CAM_NOT_FOUND; /* We could check if a higher baud rate is supported, but... forget about -- cgit v1.2.3