summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-04-23 15:34:25 +0200
committerSimon Rettberg2020-04-23 15:34:25 +0200
commit52ff3dedaf969544f2ba00091367e1054a202100 (patch)
tree2b495b091ca81be0bb38c647c6a20e1390ede356
parentUse original deadline if user logged out (diff)
downloadidle-daemon-52ff3dedaf969544f2ba00091367e1054a202100.tar.gz
idle-daemon-52ff3dedaf969544f2ba00091367e1054a202100.tar.xz
idle-daemon-52ff3dedaf969544f2ba00091367e1054a202100.zip
Fix null pointer access
-rw-r--r--src/x11util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/x11util.c b/src/x11util.c
index dc230b3..c630dc3 100644
--- a/src/x11util.c
+++ b/src/x11util.c
@@ -76,7 +76,7 @@ static void setScreenDpmsFork( const char *xauth, const char *display, int mode
Display *dpy;
int dummy;
- if ( xauth[0] != '\0' && strcmp( xauth, "-" ) != 0 ) {
+ if ( xauth != NULL && xauth[0] != '\0' && strcmp( xauth, "-" ) != 0 ) {
setenv( "XAUTHORITY", xauth, 1 );
}
dpy = XOpenDisplay( display );