summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}