Test fix for crash

pull/235/head
parent 6a7a141fe3
commit 792acf2682

@ -333,6 +333,12 @@ void on_user_save(GtkWidget *self, dictionary *dict){
int do_not_check_actve = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDontCheckCheck));
login = (char*)gtk_entry_get_text(GTK_ENTRY(window->userLoginEntry));
if (yon_char_is_empty(login)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
return;
}
if (login[0]>'0'&&login[0]<'9'&&!do_not_check_actve){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),USER_BEGINS_WITH_DIGIT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
@ -511,7 +517,7 @@ void on_user_save(GtkWidget *self, dictionary *dict){
if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
yon_config_remove_by_key(USERADD(window->old_username));
}
if (strcmp(window->old_password,password)){
if (window->old_password&&strcmp(window->old_password,password)){
final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERSHADOW(login));
yon_config_register(USERSHADOW(login),final_command,shadow_string);
if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){

Loading…
Cancel
Save