[gnome-builder] libide/core: more assertions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/core: more assertions
- Date: Sat, 6 Aug 2022 08:24:09 +0000 (UTC)
commit 5c6a96e4628dc11073006cd9dd29d0922dc6eec6
Author: Christian Hergert <chergert redhat com>
Date: Sat Aug 6 01:16:24 2022 -0700
libide/core: more assertions
src/libide/core/ide-layered-settings.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/core/ide-layered-settings.c b/src/libide/core/ide-layered-settings.c
index 022cb18af..18de0ef14 100644
--- a/src/libide/core/ide-layered-settings.c
+++ b/src/libide/core/ide-layered-settings.c
@@ -486,6 +486,7 @@ ide_layered_settings_get_key (IdeLayeredSettings *self,
const char *key)
{
g_autoptr(GSettingsSchema) schema = NULL;
+ GSettingsSchemaKey *ret;
g_return_val_if_fail (IDE_IS_LAYERED_SETTINGS (self), NULL);
g_return_val_if_fail (key != NULL, NULL);
@@ -493,8 +494,12 @@ ide_layered_settings_get_key (IdeLayeredSettings *self,
g_object_get (self->memory_settings,
"settings-schema", &schema,
NULL);
+ g_assert (schema != NULL);
- return g_settings_schema_get_key (schema, key);
+ ret = g_settings_schema_get_key (schema, key);
+ g_assert (ret != NULL);
+
+ return ret;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]