From d68c64e669a4676570086f0c55e52bbb93cf23d0 Mon Sep 17 00:00:00 2001 From: Jiuyang liu Date: Mon, 10 Feb 2020 20:50:00 +0000 Subject: [PATCH] bug fix for user is NULL --- vncviewer/UserDialog.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vncviewer/UserDialog.cxx b/vncviewer/UserDialog.cxx index 8fa26cf3..1d90cc50 100644 --- a/vncviewer/UserDialog.cxx +++ b/vncviewer/UserDialog.cxx @@ -78,7 +78,7 @@ void UserDialog::getUserPasswd(bool secure, char** user, char** password) char *envUsername = getenv("VNC_USERNAME"); char *envPassword = getenv("VNC_PASSWORD"); - if(envUsername && envPassword) { + if(user && envUsername && envPassword) { *user = strdup(envUsername); *password = strdup(envPassword); return; -- 2.39.5