3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/gnu/packages/patches/glib-keyfile-arguments.patch
Marius Bakke ee46474d54
gnu: glib: Fix argument handling in keyfile backend.
* gnu/packages/patches/glib-keyfile-arguments.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/glib.scm (glib)[source](patches): Add it.
2019-07-12 16:50:14 +02:00

20 lines
794 B
Diff

Fix a problem with the keyfile backend whereby instantiating it with
the default NULL value would cause an assertion error:
https://gitlab.gnome.org/GNOME/glib/issues/1825
This issue showed up when running the test suites of uhttpmock and spice.
diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
--- a/gio/gkeyfilesettingsbackend.c
+++ b/gio/gkeyfilesettingsbackend.c
@@ -740,7 +740,8 @@ g_keyfile_settings_backend_set_property (GObject *object,
case PROP_FILENAME:
/* Construct only. */
g_assert (kfsb->file == NULL);
- kfsb->file = g_file_new_for_path (g_value_get_string (value));
+ if (g_value_get_string (value))
+ kfsb->file = g_file_new_for_path (g_value_get_string (value));
break;
case PROP_ROOT_PATH: