summaryrefslogtreecommitdiff
path: root/src/seat-unity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/seat-unity.c')
-rw-r--r--src/seat-unity.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/seat-unity.c b/src/seat-unity.c
index df538b09..d08c2b23 100644
--- a/src/seat-unity.c
+++ b/src/seat-unity.c
@@ -380,11 +380,11 @@ seat_unity_set_next_session (Seat *seat, Session *session)
static void
seat_unity_run_script (Seat *seat, DisplayServer *display_server, Process *script)
{
- const gchar *path;
- XServerLocal *x_server;
-
if (IS_X_SERVER_LOCAL (display_server))
{
+ XServerLocal *x_server;
+ const gchar *path;
+
x_server = X_SERVER_LOCAL (display_server);
path = x_server_local_get_authority_file_path (x_server);
process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));