[Xfce4-commits] <exo:stephan/gtk3> Add missing property warnings.

Nick Schermer noreply at xfce.org
Tue May 15 20:46:01 CEST 2012


Updating branch refs/heads/stephan/gtk3
         to 643a73f8436c884de50c3527286a8d381bb63308 (commit)
       from 2f9b32103fea0bd0a9b98eca3f4b187ff6f0cb2e (commit)

commit 643a73f8436c884de50c3527286a8d381bb63308
Author: Nick Schermer <nick at xfce.org>
Date:   Tue May 15 20:45:01 2012 +0200

    Add missing property warnings.

 exo/exo-binding.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/exo/exo-binding.c b/exo/exo-binding.c
index 8d5e116..89ab570 100644
--- a/exo/exo-binding.c
+++ b/exo/exo-binding.c
@@ -354,7 +354,20 @@ exo_binding_new_full (GObject            *src_object,
   g_return_val_if_fail (G_IS_OBJECT (dst_object), NULL);
 
   src_pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (src_object), src_property);
+  if (G_UNLIKELY (src_pspec == NULL))
+    {
+      g_critical ("Object of type '%s' has no property named '%s'",
+                  G_OBJECT_TYPE_NAME (src_object), src_property);
+      return NULL;
+    }
+
   dst_pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (dst_object), dst_property);
+  if (G_UNLIKELY (dst_pspec == NULL))
+    {
+      g_critical ("Object of type '%s' has no property named '%s'",
+                  G_OBJECT_TYPE_NAME (dst_object), dst_property);
+      return NULL;
+    }
 
   if (transform == NULL)
     transform = (ExoBindingTransform) g_value_transform;


More information about the Xfce4-commits mailing list