[gdm/wip/wayland-at-login-screen: 54/70] local-display-factory: don't assume display has display number
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/wayland-at-login-screen: 54/70] local-display-factory: don't assume display has display number
- Date: Wed, 18 Feb 2015 06:28:02 +0000 (UTC)
commit 926008d3f97c44ad9a07da12962fbdcbddcb55f9
Author: Ray Strode <rstrode redhat com>
Date: Mon Feb 16 12:48:07 2015 -0500
local-display-factory: don't assume display has display number
logind managed displays don't have (known) display numbers, so
we shouldn't assert that there's going to be one on display
status changes.
daemon/gdm-local-display-factory.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index d49bf25..de2feb7 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -271,7 +271,6 @@ on_display_status_changed (GdmDisplay *display,
num = -1;
gdm_display_get_x11_display_number (display, &num, NULL);
- g_assert (num != -1);
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
@@ -285,7 +284,9 @@ on_display_status_changed (GdmDisplay *display,
case GDM_DISPLAY_FINISHED:
/* remove the display number from factory->priv->used_display_numbers
so that it may be reused */
- g_hash_table_remove (factory->priv->used_display_numbers, GUINT_TO_POINTER (num));
+ if (num != -1) {
+ g_hash_table_remove (factory->priv->used_display_numbers, GUINT_TO_POINTER (num));
+ }
gdm_display_store_remove (store, display);
/* Create a new equivalent display if it was static */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]