diff options
author | Ray Strode <halfline@gmail.com> | 2021-12-22 21:22:21 +0000 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2021-12-22 21:22:21 +0000 |
commit | 800eb651350bf19eec416ceedfe5744317fed502 (patch) | |
tree | 95a355ddf02263bcdc15560c70cd31ba67264745 | |
parent | c6e833c2fddcfc3b42dae2ae6250c5add443e1a7 (diff) | |
parent | 8c03f26dcd0e37fc8fd4fa567b6e60864d694c3e (diff) | |
download | gdm-800eb651350bf19eec416ceedfe5744317fed502.tar.gz |
Merge branch 'fix-crash-when-doomed' into 'main'
local-display-factory: Don't crash if Xorg and Wayland are both unavailable
Closes #739
See merge request GNOME/gdm!160
-rw-r--r-- | daemon/gdm-local-display-factory.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index 5fbbad68..c00e1c47 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -684,8 +684,13 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory, falling_back = factory->num_failures > 0; session_types = gdm_local_display_factory_get_session_types (factory, falling_back); - g_debug ("GdmLocalDisplayFactory: New displays on seat0 will use %s%s", - session_types[0], falling_back? " fallback" : ""); + if (session_types == NULL) { + g_debug ("GdmLocalDisplayFactory: Both Wayland and Xorg are unavailable"); + seat_supports_graphics = FALSE; + } else { + g_debug ("GdmLocalDisplayFactory: New displays on seat0 will use %s%s", + session_types[0], falling_back? " fallback" : ""); + } } else { is_seat0 = FALSE; |