]> spindle.queued.net Git - midori/commitdiff
Emit a warning when trying to get or set a non-existing setting
authorChristian Dywan <christian@twotoasts.de>
Sat, 21 Feb 2009 22:16:44 +0000 (23:16 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 21 Feb 2009 22:16:44 +0000 (23:16 +0100)
midori/midori-extension.c

index 7f8f01b190d6bcf7d28b290096d2150ccfa39d6c..96edfae54a482a1300764c467748c38a4a673f82 100644 (file)
@@ -95,6 +95,9 @@ void me_setting_free (gpointer setting)
         (extension->priv->lsettings, setting);
 
 #define me_setting_type(setting, gtype, rreturn) \
+if (!setting) { \
+g_critical ("%s: There is no setting with the name '%s' installed.", G_STRFUNC, name); \
+rreturn; } \
 if (setting->type != gtype) { \
 g_critical ("%s: The setting '%s' is not a string.", G_STRFUNC, name); \
 rreturn; }