diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2014-03-18 09:05:17 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2014-03-18 09:05:17 +1300 |
commit | 1f3c12bc02da3c1a314bd9d982c13fa7c7a7b4e6 (patch) | |
tree | 12b86fecbffd9a575f19ffd1e888c8051d5d1fc5 | |
parent | e03ac41bb0fc3d8cfe72e625deff8be1192cec89 (diff) | |
download | lightdm-git-1f3c12bc02da3c1a314bd9d982c13fa7c7a7b4e6.tar.gz |
Handle not getting an X connection when attempting to get X layouts
-rw-r--r-- | liblightdm-gobject/layout.c | 3 |
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)) |