From a30253565f667cf70a8a06768833131519a19e72 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 18 Mar 2014 09:04:52 +1300 Subject: Handle not getting an X connection when attempting to get X layouts --- liblightdm-gobject/layout.c | 3 +++ 1 file changed, 3 insertions(+) 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)) -- cgit v1.2.1