[gdm/disable-hybrid-nvidia: 1/24] local-display-factory: Don't crash if Xorg and Wayland are both unavailable
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/disable-hybrid-nvidia: 1/24] local-display-factory: Don't crash if Xorg and Wayland are both unavailable
- Date: Fri, 4 Mar 2022 19:15:40 +0000 (UTC)
commit 93a81593eb1b5a5f78f8192bdd81d26872cb4d46
Author: Ray Strode <rstrode redhat com>
Date: Thu Oct 7 15:34:27 2021 -0400
local-display-factory: Don't crash if Xorg and Wayland are both unavailable
At the moment if Wayland doesn't work, the login screen will fall back
to Xorg, and if Xorg doesn't work the login screen will fall back to
Wayland.
But if the fall back choice is disabled explicitly, GDM will just crash.
This commit fixes the crash.
Closes: https://gitlab.gnome.org/GNOME/gdm/-/issues/739
daemon/gdm-local-display-factory.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 5fbbad68f..c00e1c47d 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]