summaryrefslogtreecommitdiff
path: root/plugins/hotkeys
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-12-16 21:28:52 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-12-16 21:29:03 +0100
commit1daab59225202c7f17679a8570dd19e744c5c36b (patch)
tree1e70cc7fc312d4afdaa3f56bbb5e8a5d5f2a6ac0 /plugins/hotkeys
parent85348e09449ca64ecf099477520e99a66e608137 (diff)
gtkui, hotkeys: fix running without X (bug #1023)
Diffstat (limited to 'plugins/hotkeys')
-rw-r--r--plugins/hotkeys/hotkeys.c5
1 files changed, 4 insertions, 1 deletions
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
}