diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2018-01-24 09:57:21 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2018-01-24 09:57:21 +0100 |
commit | b654527590df0c75db30392ef58eb2d196cf66b1 (patch) | |
tree | 6bcce93ff7f5ec6d747214b3b67b18442c4f0e68 | |
parent | d0b168ed218194f239799a5f6785be506c793215 (diff) | |
download | uca-b654527590df0c75db30392ef58eb2d196cf66b1.tar.gz uca-b654527590df0c75db30392ef58eb2d196cf66b1.tar.bz2 uca-b654527590df0c75db30392ef58eb2d196cf66b1.tar.xz uca-b654527590df0c75db30392ef58eb2d196cf66b1.zip |
Abort construction if props cannot be parsed
-rw-r--r-- | bin/tools/common.c | 8 |
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; } |