From 1daab59225202c7f17679a8570dd19e744c5c36b Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Mon, 16 Dec 2013 21:28:52 +0100 Subject: gtkui, hotkeys: fix running without X (bug #1023) --- plugins/hotkeys/hotkeys.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/hotkeys') diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c index 42ca7b4d..ca31e1c3 100644 --- a/plugins/hotkeys/hotkeys.c +++ b/plugins/hotkeys/hotkeys.c @@ -410,7 +410,10 @@ static void cleanup () { command_count = 0; #ifndef __APPLE__ - XCloseDisplay (disp); + if (disp) { + XCloseDisplay (disp); + disp = NULL; + } #endif } -- cgit v1.2.3