diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-05-18 13:08:44 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-05-19 12:10:07 -0400 |
commit | fcbb6b7fe36688d1af398766a333535e55939edb (patch) | |
tree | 225ce3a223513d1efd5a9d897d44da41647625dc | |
parent | 246385a8e7a435acd0c854aa43912352eb104acb (diff) | |
download | gtk+-fcbb6b7fe36688d1af398766a333535e55939edb.tar.gz |
wayland: Survive lack of settings
This can be made to happen eg by setting XDG_DATA_DIRS and
XDG_DATA_HOME to /. Not a useful value, but not a good reason
to crash either.
-rw-r--r-- | gdk/wayland/gdkscreen-wayland.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c index a0583e40fa..865aa1c9b9 100644 --- a/gdk/wayland/gdkscreen-wayland.c +++ b/gdk/wayland/gdkscreen-wayland.c @@ -620,6 +620,8 @@ init_settings (GdkScreen *screen) screen_wayland->settings = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref); source = g_settings_schema_source_get_default (); + if (source == NULL) + return; for (i = 0; i < G_N_ELEMENTS (translations); i++) { |