From b654527590df0c75db30392ef58eb2d196cf66b1 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 24 Jan 2018 09:57:21 +0100 Subject: Abort construction if props cannot be parsed --- bin/tools/common.c | 8 ++++++-- 1 file 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; } -- cgit v1.2.3