From f4592c7ebcdfaeeb11979958586c7759696c3b65 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 14 Jan 2026 17:24:05 +0000 Subject: [PATCH] Test fix for crash --- source/ubinstall-gtk-components.c | 2 +- source/ubinstall-gtk-install-start.c | 3 +-- source/ubinstall-gtk-page-switch.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 36483b1..b75dab7 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -52,7 +52,7 @@ int yon_kernel_addon_save(main_window *widgets){ int yon_os_components_save(main_window *widgets){ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); GList *iter; - int size; + int size=0; int overall_num=0; config_str modules = NULL; for(iter = list;iter;iter=iter->next){ diff --git a/source/ubinstall-gtk-install-start.c b/source/ubinstall-gtk-install-start.c index 9201743..67d6f6f 100644 --- a/source/ubinstall-gtk-install-start.c +++ b/source/ubinstall-gtk-install-start.c @@ -2,8 +2,7 @@ int yon_installation_start(main_window *widgets){ gtk_widget_show(gtk_widget_get_parent(widgets->InstallationProgress)); - int ret = !pthread_create(&main_config.install_thread,NULL,on_config_save,widgets); - return ret; + return !pthread_create(&main_config.install_thread,NULL,on_config_save,widgets); } void yon_quick_install(GtkWidget *self, main_window *widgets){ diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index 0eedf03..0ffaffc 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -496,7 +496,7 @@ void on_page_cancel_clicked(GtkWidget *, main_window *widgets){ data->action_text=INTERRUPT_TEXT_LABEL; data->title=WARNING_TITLE_LABEL; if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){ - kill(main_config.install_thread,SIGKILL); + pthread_cancel(main_config.install_thread); gtk_button_set_label(GTK_BUTTON(widgets->NextButton),NEXT_LABEL); GtkWidget *image = gtk_button_get_image(GTK_BUTTON(widgets->NextButton)); gtk_image_set_from_icon_name(GTK_IMAGE(image),arrow_right_icon_path,GTK_ICON_SIZE_BUTTON);