summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2015-01-23 14:53:38 +0100
committerTimo Dritschler <timo.dritschler@kit.edu>2015-01-23 14:54:32 +0100
commit43a5d42eeaccb08b7703e01e326e397ed3cd4ac2 (patch)
treeb7addea53ef32b7a47fcb6a100a06a86e33d8b39
parentac4ee2d0c90cf9ef0ee1c3420b3a63b3e1869ffb (diff)
downloaduca-43a5d42eeaccb08b7703e01e326e397ed3cd4ac2.tar.gz
uca-43a5d42eeaccb08b7703e01e326e397ed3cd4ac2.tar.bz2
uca-43a5d42eeaccb08b7703e01e326e397ed3cd4ac2.tar.xz
uca-43a5d42eeaccb08b7703e01e326e397ed3cd4ac2.zip
Fixed a crash when passing a 'NULL' parameter to get_camerah
-rw-r--r--src/uca-plugin-manager.c5
1 files changed, 4 insertions, 1 deletions
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++;
}