[gnome-boxes] Check that the programmer is doing the right thing



commit c23e2c19d48fba37328ca751e412c10ab645e6f7
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Fri Aug 3 04:08:09 2012 +0200

    Check that the programmer is doing the right thing
    
    The saved property needs to be introspectable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681104

 src/display-config.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/display-config.vala b/src/display-config.vala
index df787e9..5c6b2e7 100644
--- a/src/display-config.vala
+++ b/src/display-config.vala
@@ -59,7 +59,12 @@ private class Boxes.DisplayConfig: GLib.Object, Boxes.IConfig {
     }
 
     public void load_display_property (Object display, string property_name, Value default_value) {
-        var value = Value (display.get_class ().find_property (property_name).value_type);
+        var property = display.get_class ().find_property (property_name);
+        if (property == null) {
+            debug ("You forgot the property '%s' needs to have public getter!", property_name);
+        }
+
+        var value = Value (property.value_type);
 
         try {
             if (value.type () == typeof (string))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]