Emit a warning when trying to get or set a non-existing setting
This commit is contained in:
parent
5f52e0d21f
commit
a177ac67b9
1 changed files with 3 additions and 0 deletions
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue