From a177ac67b9ca85c08daabaf0fb30a540418a2789 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 21 Feb 2009 23:16:44 +0100 Subject: [PATCH] Emit a warning when trying to get or set a non-existing setting --- midori/midori-extension.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.39.5