mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-13 14:05:05 +01:00
[gsettings] Add g_return_*_if_fail() guards in GSettingsBackend
This commit is contained in:
parent
0fa791b29d
commit
bf0f8ad8ee
@ -445,6 +445,8 @@ g_settings_backend_changed_tree (GSettingsBackend *backend,
|
|||||||
GetKeysState state = { 0, };
|
GetKeysState state = { 0, };
|
||||||
gchar **list;
|
gchar **list;
|
||||||
|
|
||||||
|
g_return_if_fail (G_IS_SETTINGS_BACKEND (backend));
|
||||||
|
|
||||||
list = g_new (gchar *, g_tree_nnodes (tree) + 1);
|
list = g_new (gchar *, g_tree_nnodes (tree) + 1);
|
||||||
state.items = list;
|
state.items = list;
|
||||||
|
|
||||||
@ -914,6 +916,7 @@ g_settings_backend_setup (const gchar *context,
|
|||||||
GSettingsBackend *backend)
|
GSettingsBackend *backend)
|
||||||
{
|
{
|
||||||
g_return_if_fail (context[0] != '\0');
|
g_return_if_fail (context[0] != '\0');
|
||||||
|
g_return_if_fail (G_IS_SETTINGS_BACKEND (backend));
|
||||||
|
|
||||||
if (g_settings_backends == NULL)
|
if (g_settings_backends == NULL)
|
||||||
g_settings_backends = g_hash_table_new (g_str_hash, g_str_equal);
|
g_settings_backends = g_hash_table_new (g_str_hash, g_str_equal);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user