summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-08-07 12:19:07 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-08-07 12:19:07 +0200
commit9938d9a5d31dba215f9a4cd623b145f12b4ecd2c (patch)
tree313e8b4b593aa2836b6a1b2aab795a8300d7e069 /src
parente633d1f5ad23e6ef092c0b5cfac1baa6c1c057dd (diff)
downloaduca-9938d9a5d31dba215f9a4cd623b145f12b4ecd2c.tar.gz
uca-9938d9a5d31dba215f9a4cd623b145f12b4ecd2c.tar.bz2
uca-9938d9a5d31dba215f9a4cd623b145f12b4ecd2c.tar.xz
uca-9938d9a5d31dba215f9a4cd623b145f12b4ecd2c.zip
Prevent overwriting unit definition
Diffstat (limited to 'src')
-rw-r--r--src/uca-camera.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c
index cbc0e90..ae8fea9 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -135,7 +135,10 @@ struct _UcaCameraPrivate {
static void
uca_camera_set_property_unit (GParamSpec *pspec, UcaUnit unit)
{
- g_param_spec_set_qdata (pspec, UCA_UNIT_QUARK, GINT_TO_POINTER (unit));
+ if (g_param_spec_get_qdata (pspec, UCA_UNIT_QUARK) != NULL)
+ g_warning ("::%s already has a unit", pspec->name);
+ else
+ g_param_spec_set_qdata (pspec, UCA_UNIT_QUARK, GINT_TO_POINTER (unit));
}
static void