From 4b45279ecbfedf6739e622815a05ea28273fe116 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Thu, 26 Mar 2026 13:42:37 +0600 Subject: [PATCH] Crash fix --- source/ubinstall-gtk-users.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/ubinstall-gtk-users.c b/source/ubinstall-gtk-users.c index 8b146c3..b37f046 100644 --- a/source/ubinstall-gtk-users.c +++ b/source/ubinstall-gtk-users.c @@ -34,7 +34,7 @@ int yon_users_save(main_window *widgets){ } } } - yon_config_remove_by_args(DEFAULTUSER_parameter); + yon_config_remove_by_args(DEFAULTUSER_parameter,NULL); } if (!main_config.configure_mode){ @@ -195,8 +195,13 @@ void yon_user_init(main_window *widgets){ g_object_set_data(G_OBJECT(user->MainBox),"widgets",widgets); gtk_box_pack_start(GTK_BOX(widgets->UserAddBox),user->MainBox,0,0,0); gtk_entry_set_text(GTK_ENTRY(user->UsernameEntry),ADMINISTRATOR_LABEL); - gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),default_user); - gtk_entry_set_text(GTK_ENTRY(user->PasswordEntry),default_passwd); + if (!yon_char_is_empty(default_user)) + gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),default_user); + else { + gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),ADMINISTRATOR_LABEL); + } + if (!yon_char_is_empty(default_passwd)) + gtk_entry_set_text(GTK_ENTRY(user->PasswordEntry),default_passwd); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),1); } for (int i=0;i