summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-03-18 09:04:52 +1300
committerRobert Ancell <robert.ancell@canonical.com>2014-03-18 09:04:52 +1300
commita30253565f667cf70a8a06768833131519a19e72 (patch)
treeff30cf6f297fcdbf08c5625a53fe7347bfa47276
parent6da70c599d0cdae1b1835599685e5f711e1012ea (diff)
downloadlightdm-git-lightdm-1-4.tar.gz
Handle not getting an X connection when attempting to get X layoutslightdm-1-4
-rw-r--r--liblightdm-gobject/layout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/liblightdm-gobject/layout.c b/liblightdm-gobject/layout.c
index d0792101..daa4278a 100644
--- a/liblightdm-gobject/layout.c
+++ b/liblightdm-gobject/layout.c
@@ -116,6 +116,9 @@ lightdm_get_layouts (void)
return layouts;
display = XOpenDisplay (NULL);
+ if (display == NULL)
+ return NULL;
+
xkl_engine = xkl_engine_get_instance (display);
xkl_config = xkl_config_rec_new ();
if (!xkl_config_rec_get_from_server (xkl_config, xkl_engine))