aboutsummaryrefslogtreecommitdiff
path: root/src/GlobalHotkeysX11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GlobalHotkeysX11.cpp')
-rw-r--r--src/GlobalHotkeysX11.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/GlobalHotkeysX11.cpp b/src/GlobalHotkeysX11.cpp
index 2943397..c8d198c 100644
--- a/src/GlobalHotkeysX11.cpp
+++ b/src/GlobalHotkeysX11.cpp
@@ -138,6 +138,9 @@ namespace gsr {
}
void GlobalHotkeysX11::poll_events() {
+ if(!dpy)
+ return;
+
while(XPending(dpy)) {
XNextEvent(dpy, &xev);
if(xev.type == KeyPress) {