commit 9bfc13d64b5acb92c6648c696a9d9260fcbecc65
parent a63ed7a4d7996b79aa0c810c0c739075a3075c58
Author: Conrad Parker <conrad@metadecks.org>
Date: Wed, 10 Jan 2018 11:20:50 +0800
Merge pull request #27 from mptre/master
Avoid passing NULL to vsnprintf()
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xsel.c b/xsel.c
@@ -2151,7 +2151,8 @@ main(int argc, char *argv[])
display = XOpenDisplay (display_name);
if (display==NULL) {
- exit_err ("Can't open display: %s\n", display_name);
+ exit_err ("Can't open display: %s\n",
+ display_name ? display_name : "(null)");
}
root = XDefaultRootWindow (display);