Merge pull request 'Fixed crash at status box despawning' (#24) from YanTheKaller/libublsettings-gtk3:master into master

Reviewed-on: #24
master v1.22
Dmitry Razumov 1 year ago
commit 5cb480fcfb

@ -928,7 +928,10 @@ int yon_ubl_status_box_spawn_infinite(GtkContainer *container, char *status_id,
}
}
int delete_busy=0;
int _yon_ubl_status_box_despawn_infinite(GtkContainer *container){
if (!delete_busy){
delete_busy=1;
if (yon_status_thread_id){
free(yon_status_thread_id);
yon_status_thread_id=NULL;
@ -936,14 +939,20 @@ int _yon_ubl_status_box_despawn_infinite(GtkContainer *container){
GList *list = gtk_container_get_children(container);
for (int i=0; i<g_list_length(list);i++){
GtkWidget *revealer = g_list_nth_data(list,i);
g_list_free(list);
if (GTK_IS_REVEALER(revealer)){
gtk_revealer_set_reveal_child(GTK_REVEALER(revealer),0);
usleep(200000);
list = gtk_container_get_children(container);
if (g_list_length>0){
if (GTK_IS_REVEALER(revealer)){
gtk_widget_destroy(revealer);
}
}
}
}
delete_busy=0;
}
}
int yon_ubl_status_box_despawn_infinite(GtkContainer *container){

Loading…
Cancel
Save