Fixed crash when no username and email are supplied in the login page

This commit is contained in:
2016-12-19 12:27:52 +01:00
parent c3253d971f
commit cc128417dc
+1 -1
View File
@@ -25772,7 +25772,7 @@ int get_user_line(LOGBOOK * lbs, char *user, char *password, char *full_name, ch
sprintf(str, "/list/user[name=%s]", user);
if ((user_node = mxml_find_node(lbs->pwd_xml_tree, str)) == NULL)
return 2;
} else if (email[0]) {
} else if (email && email[0]) {
sprintf(str, "/list/user[email=%s]", email);
if ((user_node = mxml_find_node(lbs->pwd_xml_tree, str)) == NULL)
return 2;