From: Christian Dywan Date: Sat, 21 Feb 2009 22:16:44 +0000 (+0100) Subject: Emit a warning when trying to get or set a non-existing setting X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a177ac67b9ca85c08daabaf0fb30a540418a2789;p=midori Emit a warning when trying to get or set a non-existing setting --- diff --git a/midori/midori-extension.c b/midori/midori-extension.c index 7f8f01b1..96edfae5 100644 --- a/midori/midori-extension.c +++ b/midori/midori-extension.c @@ -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; }