summaryrefslogtreecommitdiffstats
path: root/src/uca.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-02-23 09:24:44 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-02-23 09:24:44 +0100
commitd69b1e834cc1558ff117688da7030dabd22099fa (patch)
treef2020a161aefc73b789386a1c38e5a260b600ee6 /src/uca.c
parent29aec734715f7c4d6b8157ac514eff4fd8dd0242 (diff)
downloaduca-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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/uca.c b/src/uca.c
index 3549e60..af934c8 100644
--- a/src/uca.c
+++ b/src/uca.c
@@ -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);
+ }
}