diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-02-23 09:24:44 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-02-23 09:24:44 +0100 |
commit | d69b1e834cc1558ff117688da7030dabd22099fa (patch) | |
tree | f2020a161aefc73b789386a1c38e5a260b600ee6 /src/uca.c | |
parent | 29aec734715f7c4d6b8157ac514eff4fd8dd0242 (diff) | |
download | uca-d69b1e834cc1558ff117688da7030dabd22099fa.tar.gz uca-d69b1e834cc1558ff117688da7030dabd22099fa.tar.bz2 uca-d69b1e834cc1558ff117688da7030dabd22099fa.tar.xz uca-d69b1e834cc1558ff117688da7030dabd22099fa.zip |
Do something meaningful and check for frame grabber library
Diffstat (limited to 'src/uca.c')
-rw-r--r-- | src/uca.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -33,7 +33,7 @@ struct uca_t *uca_init() int i = 0; while (inits[i] != NULL) { uca_cam_init init = inits[i]; - if (init(uca)) + if (init(uca) != UCA_ERR_INIT_NOT_FOUND) return uca; i++; } @@ -45,6 +45,8 @@ struct uca_t *uca_init() void uca_destroy(struct uca_t *uca) { - uca->cam_destroy(uca); - free(uca); + if (uca != NULL) { + uca->cam_destroy(uca); + free(uca); + } } |