From 43a5d42eeaccb08b7703e01e326e397ed3cd4ac2 Mon Sep 17 00:00:00 2001 From: Timo Dritschler Date: Fri, 23 Jan 2015 14:53:38 +0100 Subject: Fixed a crash when passing a 'NULL' parameter to get_camerah --- src/uca-plugin-manager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/uca-plugin-manager.c b/src/uca-plugin-manager.c index 704c398..3b62f68 100644 --- a/src/uca-plugin-manager.c +++ b/src/uca-plugin-manager.c @@ -281,7 +281,10 @@ transform_hash_entry_to_gparameter (gpointer key, { GParameter *parameter = &(params->p[params->idx]); - parameter->value = *((GValue*)value); + if (value) + parameter->value = *((GValue*)value); + else + g_value_set_gtype (&(parameter->value), G_TYPE_NONE); parameter->name = g_strdup ((const gchar*)key); params->idx++; } -- cgit v1.2.3