FIX:do not store empty use access codes

jira:[STUDIO-3776]

Change-Id: I660533ecbee25409967ab7b4df625d4a53451faf
This commit is contained in:
tao wang 2023-09-01 19:30:39 +08:00 committed by Lane.Wei
parent 34ee98f5ad
commit 375932aea0
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ void MachineObject::set_user_access_code(std::string code, bool only_refresh)
this->user_access_code = code;
if (only_refresh && !code.empty()) {
AppConfig* config = GUI::wxGetApp().app_config;
if (config) {
if (config && !code.empty()) {
GUI::wxGetApp().app_config->set_str("user_access_code", dev_id, code);
}
}