diff options
Diffstat (limited to 'src/cameras/pf.c')
-rw-r--r-- | src/cameras/pf.c | 5 |
1 files changed, 1 insertions, 4 deletions
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 |