summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2018-01-24 09:57:21 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2018-01-24 09:57:21 +0100
commitb654527590df0c75db30392ef58eb2d196cf66b1 (patch)
tree6bcce93ff7f5ec6d747214b3b67b18442c4f0e68 /bin
parentd0b168ed218194f239799a5f6785be506c793215 (diff)
downloaduca-b654527590df0c75db30392ef58eb2d196cf66b1.tar.gz
uca-b654527590df0c75db30392ef58eb2d196cf66b1.tar.bz2
uca-b654527590df0c75db30392ef58eb2d196cf66b1.tar.xz
uca-b654527590df0c75db30392ef58eb2d196cf66b1.zip
Abort construction if props cannot be parsed
Diffstat (limited to 'bin')
-rw-r--r--bin/tools/common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/tools/common.c b/bin/tools/common.c
index c80d0c6..77b0064 100644
--- a/bin/tools/common.c
+++ b/bin/tools/common.c
@@ -81,8 +81,12 @@ uca_common_get_camera (UcaPluginManager *manager, const gchar *name, GError **er
camera = uca_plugin_manager_get_camera (manager, name, error, NULL);
- if (camera != NULL)
- uca_camera_parse_arg_props (camera, uca_prop_assignment_array, n_props, error);
+ if (camera != NULL) {
+ if (!uca_camera_parse_arg_props (camera, uca_prop_assignment_array, n_props, error)) {
+ g_object_unref (camera);
+ return NULL;
+ }
+ }
return camera;
}